* Thus wrote John Holmes:
> From: "John Nichel" <[EMAIL PROTECTED]>
> >>i think str_replace is faster that ereg_replace
> >
> >We tested that theory a while back on here (I don't remember the subject
> >of the emails, so finding it would be kind of hard), and it came out to be
> >almost exactally the same speed.
>
> Not that speed tests like this really matter in the long run of your code,
> but:
>
> str_replace: 0.26480603218079
> ereg_replace: 0.61685109138489
>
> preg_replace came in at about 0.4, btw
I betya strtr() will win over them all :) Also, results will vary
greatly with a string like:
$str = "''''''''''''''''''''''''''''''''''''";
str_replace will fall down closer to preg.
> str_replace(array('.',',','!','?','"','\''),'',$str);
Curt
--
The above comments may offend you. flame at will.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php