Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45775 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 65292 invoked from network); 12 Oct 2009 18:42:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2009 18:42:42 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:55970] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 02/57-54920-1A873DA4 for ; Mon, 12 Oct 2009 14:42:42 -0400 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 9675D414400B; Mon, 12 Oct 2009 18:43:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MxgIHgyEeq2E; Mon, 12 Oct 2009 20:43:39 +0200 (CEST) Received: from [192.168.0.151] (217-162-131-234.dclient.hispeed.ch [217.162.131.234]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id 89E684144009; Mon, 12 Oct 2009 20:43:39 +0200 (CEST) To: "Tomas Kuliavas" In-Reply-To: <50994.4e3f9432.1255372442.nsm@avilys.eik.lt> X-Priority: 3 (Normal) 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> <50994.4e3f9432.1255372442.nsm@avilys.eik.lt> Message-ID: <5A278A13-59F8-4C2A-B1D1-E47927DF797E@pooteeweet.org> Content-Type: text/plain; charset=UTF-8; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Apple Message framework v936) Date: Mon, 12 Oct 2009 20:42:37 +0200 Cc: internals@lists.php.net X-Mailer: Apple Mail (2.936) Subject: Re: [PHP-DEV] Why is ereg being deprecated? From: mls@pooteeweet.org (Lukas Kahwe Smith) On 12.10.2009, at 20:34, Tomas Kuliavas wrote: > 2009.10.12 20:55 Carl P. Corliss ra=C5=A1=C4=97: >> Lukas Kahwe Smith wrote: >> [snip] >> >>> On 12.10.2009, at 18:57, Mark Krenz wrote: >>> >>>> On Mon, Oct 12, 2009 at 04:27:02PM GMT, Pierre Joye >>>> [pierre.php@gmail.com] said the following: >> [snip] >> >>>> But I'm willing to bet that the majority of people are using =20 >>>> ereg, not >>>> PCRE. I've known about PCRE in PHP for a while now, but I =20 >>>> continue to >>>> use ereg because I thought it had better support in PHP and that =20= >>>> it was >>>> the more "official" function. Guess I was wrong. I'm sure I'm =20 >>>> not the >>>> only one who thought this. >>> >>> Maybe try to substantiate that argument with a google code search or >>> something. Personally I have seen quite the opposite, then again I =20= >>> have >>> been actively encouraging people to use preg since about 5 or more =20= >>> years >>> now. >> >> Code Search of: "eregi?(_replace)?\( lang:php" shows ~123,000 results >> Code Search of: >> "preg_(filter|grep|last_error|match_all|match|quote|=20 >> replace_callback|replace|split)\( >> lang:php" shows ~374,000 results >> >> Looks like preg_* functions are used more often than ereg* =20 >> functions to >> me... > > preg_quote() and preg_last_error() are support functions. They are =20 > used > together with other pcre functions. You double some search results. > > If you have to support something, it is not about statistics. Even =20 > 1% is > important. Before you use statistics against something, remember that > statistics can be used against you too. Everyone of us is one in seven > billion. Any person is just 0,000000014% in Earth statistics. Puh, I think this was a valid attempt at putting things closer to =20 numbers rather then assumptions. Mark's claim was that ereg is being =20 used more than preg and I think these stats do put some doubt on that =20= claim, even though it should also be noted that there are several ereg =20= using functions that are not prefixed with ereg. regards, Lukas Kahwe Smith mls@pooteeweet.org