Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:90209 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 59635 invoked from network); 6 Jan 2016 17:35:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Jan 2016 17:35:01 -0000 Authentication-Results: pb1.pair.com header.from=me@rouvenwessling.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=me@rouvenwessling.de; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain rouvenwessling.de from 80.241.60.212 cause and error) X-PHP-List-Original-Sender: me@rouvenwessling.de X-Host-Fingerprint: 80.241.60.212 mx1.mailbox.org Received: from [80.241.60.212] ([80.241.60.212:41102] helo=mx1.mailbox.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/36-21755-3405D865 for ; Wed, 06 Jan 2016 12:35:00 -0500 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id BBF4F42505; Wed, 6 Jan 2016 18:34:56 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id U-5G88pYjbw7; Wed, 6 Jan 2016 18:34:55 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.1 \(3096.5\)) In-Reply-To: Date: Wed, 6 Jan 2016 18:34:54 +0100 Cc: Internals Content-Transfer-Encoding: quoted-printable Message-ID: <74F08819-99B9-4DB7-BF79-EE39DFBF8D1C@rouvenwessling.de> References: <1C17901F-7B7C-4B89-8F87-C849AB3D7510@rouvenwessling.de> To: Dan Ackroyd X-Mailer: Apple Mail (2.3096.5) Subject: Re: [PHP-DEV] RFC: Deprecate mb_ereg_replace eval option From: me@rouvenwessling.de (=?utf-8?Q?Rouven_We=C3=9Fling?=) > On 06 Jan 2016, at 18:03, Dan Ackroyd wrote: >=20 > This is possibly a stupid question, but one that needs to be asked = anyway: Certainly not a stupid question. > Have you checked that simply converting code that uses > mb_eregi_replace to using mb_ereg_replace_callback with the i flag > behaves the same in all circumstances? Well the _callback function obviously behaves differently with regards = to the, well, callback. I haven=E2=80=99t actually tested it (kinda tough for =E2=80=9Call = situations=E2=80=9D), but if we compare mb_eregi_replace with = mb_ereg_replace with the i options is quite easy to see that they behave = the same by looking at the source. mb_eregi_replace = (https://github.com/php/php-src/blob/master/ext/mbstring/php_mbregex.c#L10= 35) calls _php_mb_regex_ereg_replace_exec with the flag = ONIG_OPTION_IGNORECASE (mb_ereg_replace calls the same function without = that flag). When options are set on the function call, those are passed = together with that flag to=20 _php_mb_regex_init_options = (https://github.com/php/php-src/blob/master/ext/mbstring/php_mbregex.c#L57= 8) which sets the ONIG_OPTION_IGNORECASE when the i option is specified. = After that both functions take exactly the same path. I hope that clears it up. Best regards Rouven=