mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Bug # 18705. Encourage use of strpos over strstr when only verifying existence of needle in haystack.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@112829 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
46a380ddef
commit
687bcc62c1
1 changed files with 10 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.2 $ -->
|
||||
<!-- $Revision: 1.3 $ -->
|
||||
<!-- splitted from ./en/functions/strings.xml, last change in rev 1.2 -->
|
||||
<refentry id="function.strstr">
|
||||
<refnamediv>
|
||||
|
@ -43,6 +43,15 @@ print $domain; // prints @example.com
|
|||
</programlisting>
|
||||
</example>
|
||||
</para>
|
||||
<para>
|
||||
<note>
|
||||
<para>
|
||||
If you only want to determine if a particular <parameter>needle</parameter>
|
||||
occours within <parameter>haystack</parameter>, use the faster and less memory
|
||||
intensive function <function>strpos</function> instead.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
<para>
|
||||
See also <function>ereg</function>, <function>preg_match</function>,
|
||||
<function>strchr</function>, <function>stristr</function>,
|
||||
|
|
Loading…
Reference in a new issue