strrpos( ) Uses the Entire Needle
In PHP 4, strpos( )
uses an entire string as a needle, whereas strrpos( )
limits the needle to a single character. If you pass
strrpos( )
a string of more than one character, it
silently uses only the first character.
In PHP 5, strrpos( )
and strripos( )
now behave identically to strpos( )
,
in that they find strings instead of just the first character.
Get Upgrading to PHP 5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.