pollita Mon Jan 20 14:59:29 2003 EDT
Modified files:
/phpdoc/en/reference/strings/functions strstr.xml
Log:
Bug # 18705. Encourage use of strpos over strstr when only verifying existence of
needle in haystack.
Index: phpdoc/en/reference/strings/functions/strstr.xml
diff -u phpdoc/en/reference/strings/functions/strstr.xml:1.2
phpdoc/en/reference/strings/functions/strstr.xml:1.3
--- phpdoc/en/reference/strings/functions/strstr.xml:1.2 Wed Apr 17 02:44:23
2002
+++ phpdoc/en/reference/strings/functions/strstr.xml Mon Jan 20 14:59:29 2003
@@ -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>
@@ -42,6 +42,15 @@
]]>
</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>,
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php