On Fri, 2009-03-13 at 19:09 +0000, Richard Heyes wrote:
> > ereg
> [Gasps and runs off shouting "PCRE"] ...

You know... Until somewhat recently I preferred POSIX over PCRE...
rationale being it's "POSIX" that's a standard!!! But recently I came
across some legacy code in a site I maintain that was using ereg(). It
just so happened I was tracking down another bug and so I was doing some
timestamp squeezing to find the problem when I discovered a horrible
horrible thing... a few preg() calls with capturing were resposible for
50% of the page load time. I changed them to preg_match() and I cut the
page time in half since the preg_match() time was negligible. I now much
prefer to use preg_xxx() functions since I have concrete evidence of
their superiority.


Ps. The docs always said that ereg() was a bit slower... they didn't say
it was severely debilitating.

Application and Templating Framework for PHP

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

Reply via email to