Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:48589 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 77248 invoked from network); 1 Jun 2010 05:44:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jun 2010 05:44:20 -0000 Authentication-Results: pb1.pair.com header.from=peter@lvp-media.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=peter@lvp-media.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lvp-media.com from 209.85.211.180 cause and error) X-PHP-List-Original-Sender: peter@lvp-media.com X-Host-Fingerprint: 209.85.211.180 mail-yw0-f180.google.com Received: from [209.85.211.180] ([209.85.211.180:54659] helo=mail-yw0-f180.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id FA/68-16697-13E940C4 for ; Tue, 01 Jun 2010 01:44:17 -0400 Received: by mail-yw0-f180.google.com with SMTP id 10so3163422ywh.18 for ; Mon, 31 May 2010 22:44:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.101.142.17 with SMTP id u17mr5902924ann.196.1275371056377; Mon, 31 May 2010 22:44:16 -0700 (PDT) Received: by 10.100.58.17 with HTTP; Mon, 31 May 2010 22:44:16 -0700 (PDT) In-Reply-To: References: <4BD87B5C.4020902@no-surprises.co.uk> <1275326628.24497.1.camel@guybrush> Date: Tue, 1 Jun 2010 07:44:16 +0200 Message-ID: To: Felipe Pena Cc: =?ISO-8859-1?Q?Johannes_Schl=FCter?= , Michael Maclean , PHP internals Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] ereg deprecation? From: peter@lvp-media.com (Peter Beverloo) 2010/5/31 Felipe Pena > > 2010/5/31 Johannes Schl=FCter > > > On Mon, 2010-05-31 at 14:09 -0300, Felipe Pena wrote: > > > Hi, > > > > > > 2010/4/28 Michael Maclean > > > > > > > Hi, > > > > I think I asked this before on IRC, but I've forgotten the answer. = I > > was > > > > just remembering that the ereg extension was due to be deprecated i= n > > PHP6 - > > > > does this still apply to trunk? > > > > > > > > > > > I think make no sense to keep it deprecated. > > > > > > Here's a patch for undeprecate ext/ereg in 5_3 and trunk: > > > http://felipe.ath.cx/diff/undeprecate-ereg.diff > > > > > > Any objection? If no, I'll commit it in soon. > > > > I still won't recommend using ereg - the missing binary-safety causes > > quite some broken checks ... is there anything that can be done which > > can't be done using pcre? If not: Less code to maintain -> less > > trouble :-) > > > > > I also won't recommend using ereg, I just thought the unique reason to > deprecate it was the unicode stuff, hence wouldn't make sense to keep it > deprecated... But as there are others motivations, I prefer leave as is t= oo. > > -- > Regards, > Felipe Pena Undeprecating the ereg extension now will not only cause confusion, because it has been deprecated for quite a while already, but it might also become a liability if Unicode or any similar non-compatible system might ever be included in the future. PCRE simply is faster under most conditions, more consistent and since a significant part of PHP Developers will also use Javascript, likely to be more appropriate for the web. Companies and individuals have been adjusting their scripts in favor of PCRE[1][2][3], undeprecating the extension seems senseless at this point. I do think Philip Olson's proposal of adding a compile-time flag for disabling ereg altogether is a good idea, as it would be the next step in moving ereg away from PHP's core. Regards, Peter Beverloo [1] https://drupal.org/node/530940 [2] http://bugs.typo3.org/view.php?id=3D9994 [3] http://www.mantisbt.org/bugs/view.php?id=3D10974