Jay Blanchard wrote:
> [snip]
> strpos() : 0.18918436765671
> preg_match() : 0.26665662288666
> [/snip]
>
> 1/3rd of a second slower....interesting. You know what though, my
> original assertion is correct....almost any of the regex functions
> will work.

Personally, I prefer using preg_match() 9 times out of 10 vs. strpos(), strstr(),
etc.  Whatever performance penalty I pay for doing this is a statistical drop in the
bucket compared to the overhead of, say, opening a connection to a database (which
nearly all of my pages do).  I'm also a perl guy so regex's are more natural to me
to read and write so I tend to favor them...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to