Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45782 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 78379 invoked from network); 12 Oct 2009 19:22:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2009 19:22:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=robert@interjinn.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=robert@interjinn.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain interjinn.com from 66.11.173.122 cause and error) X-PHP-List-Original-Sender: robert@interjinn.com X-Host-Fingerprint: 66.11.173.122 unknown Received: from [66.11.173.122] ([66.11.173.122:45035] helo=interjinn.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FF/1A-54920-BE183DA4 for ; Mon, 12 Oct 2009 15:22:20 -0400 Received: by interjinn.com (Postfix, from userid 5001) id DC5B638C1F3; Mon, 12 Oct 2009 15:22:16 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gruknuk.suds X-Spam-Level: X-Spam-Status: No, score=-4.4 required=7.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 Received: from [192.168.1.3] (blobbie [192.168.1.3]) by interjinn.com (Postfix) with ESMTPS id 012E038C0A0; Mon, 12 Oct 2009 15:22:16 -0400 (EDT) Message-ID: <4AD381E2.3040301@interjinn.com> Date: Mon, 12 Oct 2009 15:22:10 -0400 Organization: InterJinn User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Mark Krenz CC: internals@lists.php.net References: <20091012154610.GJ5179@arvo.suso.org> <20091012160854.GK5179@arvo.suso.org> <4AD356D5.2020605@lerdorf.com> <20091012162227.GL5179@arvo.suso.org> <20091012165734.GN5179@arvo.suso.org> <4AD36D8D.60806@gmail.com> <20091012191446.GS5179@arvo.suso.org> In-Reply-To: <20091012191446.GS5179@arvo.suso.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Why is ereg being deprecated? From: robert@interjinn.com (Robert Cummings) 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