Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45773 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60446 invoked from network); 12 Oct 2009 18:34:51 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 12 Oct 2009 18:34:51 -0000 Authentication-Results: pb1.pair.com header.from=tokul@users.sourceforge.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=tokul@users.sourceforge.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain users.sourceforge.net from 77.240.252.9 cause and error) X-PHP-List-Original-Sender: tokul@users.sourceforge.net X-Host-Fingerprint: 77.240.252.9 avilys.eik.lt Linux 2.6 Received: from [77.240.252.9] ([77.240.252.9:35439] helo=avilys.eik.lt) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/46-54920-AC673DA4 for ; Mon, 12 Oct 2009 14:34:51 -0400 Received: from avilys.eik.lt (avilys.local [127.0.0.1]) by avilys.eik.lt (Postfix) with ESMTP id C48662488E6 for ; Mon, 12 Oct 2009 21:34:02 +0300 (EEST) Received: from avilys.eik.lt (avilys.local [127.0.0.1]) by avilys.eik.lt (Postfix) with ESMTP id A3C082488E4 for ; Mon, 12 Oct 2009 21:34:02 +0300 (EEST) Received: from 78.63.148.50 (NaSMail authenticated user tomas@topolis.lt) by avilys.eik.lt with HTTP; Mon, 12 Oct 2009 21:34:02 +0300 (EEST) Message-ID: <50994.4e3f9432.1255372442.nsm@avilys.eik.lt> In-Reply-To: <4AD36D8D.60806@gmail.com> 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> Date: Mon, 12 Oct 2009 21:34:02 +0300 (EEST) To: internals@lists.php.net User-Agent: NaSMail/1.6 MIME-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: ClamAV using ClamSMTP Subject: =?utf-8?Q?Re:_[PHP-DEV]_Why_is_ereg_being_deprecated=3F?= From: tokul@users.sourceforge.net ("Tomas Kuliavas") 2009.10.12 20:55 Carl P. Corliss rašė: > 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 ereg, not >>> PCRE. I've known about PCRE in PHP for a while now, but I continue to >>> use ereg because I thought it had better support in PHP and that it was >>> the more "official" function. Guess I was wrong. I'm sure I'm 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 have >> been actively encouraging people to use preg since about 5 or more 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|replace_callback|replace|split)\( > lang:php" shows ~374,000 results > > Looks like preg_* functions are used more often than ereg* functions to > me... preg_quote() and preg_last_error() are support functions. They are used together with other pcre functions. You double some search results. If you have to support something, it is not about statistics. Even 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. -- Tomas