Amazing google results - still confused!
I am working on a huge application at the moment that requires a whole load of replacements in a text string (Think replacing TLA with Three Letter Abbrev’s)
I googled to see if there was a faster PHP method than str_replace(). The results on the first page gave me a chuckle and a headache.
Here is the link to the search result page
So - Is str_replace faster than preg_replace? or is it that preg_replace is faster than str_replace???
Who knows? Google certainly doesnt…


Tags: