> >>What do you think? Is it ok to break the BC here or not? As you see the > >>other change introduced with the patch is to use the whole needle string > >>while searching, not only the first character. > >> > >That break was intentional. Having strrpos() behave differently from > >strpos() in regards to needle size was not a good thing. > > > In this case it should be stated somewhere maybe in the still imaginery > "the_thin_differences_between_PHP4_and_PHP5.txt" > Well, it's in the manual page (down at the bottom). (Note: Ignore the note about converting integers to strings, I've taken that out in light of undoing that particular BC breakage). But you're absolutely right, a spot in a yet-to-be-writen FAQ couldn't hurt.
While I was in that file I fixed an offset reporting issue (offset didn't exist in 4.3 so it's not something to MFH) and introduced an optimized version of the string search for single character needles. In strrpos() it'll only be a minor difference, but strripos() saves a pair of needless emallocs. -Sara -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php