O'Reilly logo

Upgrading to PHP 5 by Adam Trachtenberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required