Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85277 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66202 invoked from network); 20 Mar 2015 11:53:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Mar 2015 11:53:58 -0000 Authentication-Results: pb1.pair.com smtp.mail=addw@phcomp.co.uk; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=addw@phcomp.co.uk; sender-id=permerror Received-SPF: pass (pb1.pair.com: domain phcomp.co.uk designates 78.32.209.33 as permitted sender) X-PHP-List-Original-Sender: addw@phcomp.co.uk X-Host-Fingerprint: 78.32.209.33 freshmint.phcomp.co.uk Received: from [78.32.209.33] ([78.32.209.33:53160] helo=mint.phcomp.co.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 27/3E-25408-25A0C055 for ; Fri, 20 Mar 2015 06:53:56 -0500 Received: from addw by mint.phcomp.co.uk with local (Exim 4.72) (envelope-from ) id 1YYvUt-0002N3-K8 for internals@lists.php.net; Fri, 20 Mar 2015 11:53:51 +0000 Date: Fri, 20 Mar 2015 11:53:51 +0000 To: internals@lists.php.net Message-ID: <20150320115351.GE10567@phcomp.co.uk> Mail-Followup-To: internals@lists.php.net References: <60525DAED8264509BF14D25637CD7C1E@gmail.com> <4DBD500BD91A4CCCBFDDFD5DD80FEC74@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Parliament Hill Computers Ltd User-Agent: Mutt/1.5.20 (2009-12-10) Subject: Re: [PHP-DEV] =?utf-8?B?5Zue5aSN?= =?utf-8?B?77ya?= [RFC][DISCUSSION] Add preg_replace_callback_array function From: addw@phcomp.co.uk (Alain Williams) On Fri, Mar 20, 2015 at 10:46:58PM +1100, Pierre Joye wrote: > On Fri, Mar 20, 2015 at 7:03 PM, Wei Dai wrote: > > Hi internals, > >> Hi internals, > >> > >> The RFC to add a user-land function for an easy-to-use and reliable > >> preg_replace_callback_array() in PHP is up for discussion: > >> https://wiki.php.net/rfc/preg_replace_callback_array > >> > >> This proposes adding one function: `preg_replace_callback_array()` that > >> is the better way to Implement when there are multiple patterns need to > >> replace. > >> > >> I would love to hear your feedback! :) > >> Any objections? > > > > I’ve sent this mail for four days, I don’t know if this RFC needs a vote. > > If you guys have no objections on this, please review the code and merge it, > > thanks. > > Nice job, i like the idea. > > I am not sure about a RFC or not. It somehow looks like a sane > replacement for something we killed (with good reasons). > > Let see what the other think :) I used s/something/code/ge in a perl script that I wrote a few days ago. Very useful. It would have been a lot more work to do it another way. So: +1 to the ability to do this, regardless of what mechanism is eventually chosen. -- Alain Williams Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php #include