On October 31, 2002 03:12 pm, Ori Staub wrote: > A few tests using eregi on windows and linux shows that it can be up to 30 > times faster the PCRE for some expressions (e.g. validating email address > format). > > See an interesting thread on sitepoint ( > http://www.sitepointforums.com/showthread.php?s=&threadid=71134 ) with some > sample benchmark scripts.
That test was flawed, preg_* style regular expressions became the leaders once the regex was fixed. After then according to people's reports it was 4+ times faster then eregi. Ilia > Ori > > ----- Original Message ----- > From: "Ilia A." <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, October 31, 2002 12:47 PM > Subject: [PHP-DEV] [PATCH] ereg to pcre conversion > > > Currently PHP ships with two regular expression libraries that are both > > installed by default, PCRE & regex. The regex library that is responsible > > for > > > ereg_* functions is fairly old and offers a very limited functionality > > compared to the PCRE library. In most cases the PCRE functions are also > > much > > > faster then the old ereg functions. > > I would like to propose that we drop the old ereg library and use only > > a single regular expression library, PCRE. For BC purposes I've written a > > patch (see attached file), which emulates the old ereg_* functions for > > people > > > who still rely on those, using PCRE. > > > > This cleanup would mean we'd only need to maintain one set of regular > > expression code, which as far as code goes is pretty complex as well as > > give > > > speed-up for people still using ereg. > > Perhaps, at some future point this would allow us to drop the ereg_* > > functions > > > all together. > > > > Ilia > > --------------------------------------------------------------------------- >- ---- > > > -- > > PHP Development Mailing List <http://www.php.net/> > > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php