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:
Sara Golemon 2003-01-20 19:59:29 +00:00
parent 46a380ddef
commit 687bcc62c1

View file

@ -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>,