Re: Why is ereg being deprecated?

From: Date: Mon, 12 Oct 2009 19:22:10 +0000
Subject: Re: Why is ereg being deprecated?
References: 1 2 3 4 5 6 7 8 9 10  Groups: php.internals 
Request: Send a blank email to internals+get-45782@lists.php.net to get a copy of this message
Mark Krenz wrote:
On Mon, Oct 12, 2009 at 05:55:25PM GMT, Carl P. Corliss [rabbitt@gmail.com] said the following:
Code Search of: "eregi?(_replace)?\( lang:php" shows ~123,000 results Code Search of: "preg_(filter|grep|last_error|match_all|match|quote|replace_callback|replace|split)\( lang:php" shows ~374,000 results Looks like preg_* functions are used more often than ereg* functions to me...
I think everyone should read this as it will prove my point. Especially book #9 I have a O'Reilly Safari Books Online account and can search the content of many of the latest books, which I consider something more official than just doing a causual Google search, which can be misleading. The number 1 selling book on Amazon in the PHP category is "PHP and MySQL Web Development" (4th Edition) from 2008 by Luke Welling and Laura Thomson. There is no mention of preg_match and the book instead shows how to use ereg based functions. In fact, they do mention PCRE, but downplay it by saying that POSIX regexs are easier to use. I think any intelligent person would see this as a alarm that the PHP world isn't ready for ereg to be dropped or changed. You need far more time for the information to make its way through the PHP community.
You are obviously right of course... the PHP world is NOT ready for the POSIX regex library to be dropped. That's why it's "deprecated" in PHP 5.3 and not removed. In a year or 3, when PHP 6 is released, one would hope that by then the PHP world WILL be ready. Cheers, Rob. -- http://www.interjinn.com Application and Templating Framework for PHP

« previous php.internals (#45782) next »