fix pr: 7763

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@35604 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
foobar 2000-11-12 03:57:21 +00:00
parent 775c542081
commit 2a9bedc61b

View file

@ -2425,6 +2425,28 @@ echo str_repeat ("-=", 10);
</para>
<para>
If <parameter>needle</parameter> is not found, returns false.
<note>
<para>
It is easy to mistake the return values for "character found at
position 0" and "character not found". Here's how to detect
the difference:
<informalexample>
<programlisting role="php">
// in PHP 4.0b3 and newer:
$pos = strrpos ($mystring, "b");
if ($pos === false) { // note: three equal signs
// not found...
}
// in versions older than 4.0b3:
$pos = strrpos ($mystring, "b");
if (is_string ($pos) &amp;&amp; !$pos) {
// not found...
}
</programlisting>
</informalexample>
</para>
</note>
</para>
<para>
If <parameter>needle</parameter> is not a string, it is converted