[wp-hackers] PHP Coding Practices
chris.lott at gmail.com
Wed Feb 15 18:21:48 GMT 2006
On 2/15/06, Mark Jaquith <mark.wordpress at txfx.net> wrote:
> You know what? I just ran a bunch of speed tests. I used small
> haystacks and big haystacks. I ran strstr($haystack, $needle)
> against strpos($haystack, $needle) !== false (as well as the opposite
> versions with a million iterations each. strstr() is faster by
> anywhere from 5 to 20%. Plus, it looks nicer in the code.
This doesn't accord with my experience or others (see, for example,
-- wonder if something else is going on here?
It's only nominally faster sans real pattern matching, but still...
More information about the wp-hackers