Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45785 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82667 invoked from network); 12 Oct 2009 19:30:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2009 19:30:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=israelekpo@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=israelekpo@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.219.227 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: israelekpo@gmail.com X-Host-Fingerprint: 209.85.219.227 mail-ew0-f227.google.com Received: from [209.85.219.227] ([209.85.219.227:33521] helo=mail-ew0-f227.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 76/1B-54920-0D383DA4 for ; Mon, 12 Oct 2009 15:30:25 -0400 Received: by ewy27 with SMTP id 27so4542819ewy.23 for ; Mon, 12 Oct 2009 12:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=H4gKbSCaiiROZfDvFmDqeRaPtk6sZGjAzX8wlZat8IU=; b=x8HbWWoMj59PCu0YYgZZDwD16QKiG0L+Qfyr0rGXWCvBI5sF8ikW18f2t6sOTr2quK +elAEaT8p/I03IWbFoiWiSRXPICxODbPr35PZqCwpCvV8dTDit59V7lI2Xd/5oTJtlIf 47lZdvK34jEHsnO12hBBC3JYDo9WmTNMtU2P4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=tIgZiCYEcWR4cxu9NiqAUpfO+JtEhQcv3noAvnVNuL8q1736zWOB4LNCGMMPjYM/U7 5S85boZzfGzWtc+Tq/JGN/aI/frf5vXDLlK8yGvFN1nKlyo99x5S1hivxVsoxxfYftXN ++aENTQUGrqRYINIdI7675U1It4/FYF6kg53A= MIME-Version: 1.0 Received: by 10.216.88.137 with SMTP id a9mr2060121wef.119.1255375820733; Mon, 12 Oct 2009 12:30:20 -0700 (PDT) In-Reply-To: <20091012191446.GS5179@arvo.suso.org> 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> Date: Mon, 12 Oct 2009 15:30:20 -0400 Message-ID: To: Mark Krenz Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=0016e6d7858bdabd2d0475c1f5a6 Subject: Re: [PHP-DEV] Why is ereg being deprecated? From: israelekpo@gmail.com (Israel Ekpo) --0016e6d7858bdabd2d0475c1f5a6 Content-Type: text/plain; charset=UTF-8 On Mon, Oct 12, 2009 at 3:14 PM, 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. > > > Going further through the list of Amazon's top selling PHP books we > have: > > 2. The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP > (Essentials) > > Ignore this as it isn't really covering PHP properly. > > 3. Regular Expression Pocket Reference: Regular Expressions: from 2008 > > This states that it covered PCRE expressions for PHP. So at least > that's right. > > > 4. Learning PHP, MySQL, and JavaScript: A Step-by-Step Guide to Creating > Dynamic Websites from 2009 > > Uses examples written with preg_match > > 5. Web Database Applications with PHP and MySQL, 2nd Edition from 2004. > > Mentions PCRE but says that they will use POSIX expressions instead. > > 6. Head First PHP & MySQL from 2008/2009 > > Talks about preg_match, mentions that ereg is removed in PHP 6. > > 7. PHP Cookbook from 2006 > > Has mixed examples, some using ereg and some using preg_match > > 8. Practical Web Practical Web 2.0 Applications with PHP > > Not on Safari > > ----> 9. Programming PHP by Kevin Tatroe, Rasmus Lerdorf and Peter > MacIntyre in 2006. Which may be considered the definitive guide to PHP > since Rasmus is a co-author. > > Uses examples with both ereg and preg_match, BUT ereg is used first in > the book and compromises the majority of the section called "Regular > Expressions". So here is an example of emphasis being placed on ereg > being the more official functions to use. > > 10. Wicked Cool PHP: Real-World Scripts That Solve Difficult Problems > > Not on Safari > > So that's about 4 out of 7 the top selling books on PHP still strongly > use ereg. I didn't find any mention in the books I read online about > ereg going away. Some of them supported PCRE more than others. But > obviously there is still a lot of use of the POSIX functions. > > These are best selling books on PHP. So there ARE A LOT of programmers > out there that think that they are doing the right thing using ereg. > Obviously books can't be the authoritative source for functions, but a > lot of times they are used that way, especially when one of them was > written by the author of the language. Duh! > > > So there is my proof. Does anyone still want to dispute me that ereg is > still heavily used and you'll make a lot of users angry if you don't > give them the proper amount of time to make this transition? > > > > > -- > Mark S. Krenz > IT Director > Suso Technology Services, Inc. > http://suso.org/ > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > If you are feeling this strongly about ereg, I would suggest you do one of the following: 1. Create a patch that contains a re-write and submit it for discussion to the internals mailing list. 2. If you are unable to do # 1. Hire or get a volunteer who can and is willing to create the patch for you. This will save us a lot of time and energy that is being dissipated/wasted in this discussion. You can also document the issue in the wiki to warn userspace PHP developers about the current situation. Again, please note that PHP is designed, developed and maintained by VOLUNTEERS. Please treat these volunteers with respect. -- "Good Enough" is not good enough. To give anything less than your best is to sacrifice the gift. Quality First. Measure Twice. Cut Once. --0016e6d7858bdabd2d0475c1f5a6--