Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:81703 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87183 invoked from network); 3 Feb 2015 11:13:21 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2015 11:13:21 -0000 Authentication-Results: pb1.pair.com smtp.mail=narf@devilix.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=narf@devilix.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain devilix.net designates 209.85.218.41 as permitted sender) X-PHP-List-Original-Sender: narf@devilix.net X-Host-Fingerprint: 209.85.218.41 mail-oi0-f41.google.com Received: from [209.85.218.41] ([209.85.218.41:50418] helo=mail-oi0-f41.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 58/DA-20608-05DA0D45 for ; Tue, 03 Feb 2015 06:13:21 -0500 Received: by mail-oi0-f41.google.com with SMTP id z81so48647421oif.0 for ; Tue, 03 Feb 2015 03:13:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=devilix.net; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kcTjrHxFlxJ5xOT3x6DixBhTs5Wmp/0CEyUBzg5TLFg=; b=kfP88A07UdxxKzBr3Vuy50GATTczuvSQsAqTET1OnWeZER/s/XOGYH5n2jmpLSqj55 papmW0gLmZwDbvtIJSLTI4UMk/SByjjf3kqnK9ekCwehYxpXbNn9F2OHLESsP/iSksgQ pammz/CjCR2FEJOsV7dhls1XC6ekcr6vPxJr4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=kcTjrHxFlxJ5xOT3x6DixBhTs5Wmp/0CEyUBzg5TLFg=; b=TDUrhX/BwAUOOb8N5t5sUai5kPbtcge92bgL6PXYf9ArDY0rI3x5c8wzG9BNw+UV1x bZ0wliEB79/hMkGbTJDqakcl0Wgax6R7Vyp0dqf65Aee2AkWN0+0AqhjdDZsmg8RuSzO LsXGR3w2YZK9VAZuhkg6KGNIi2z1ElkGqnEH2Q1W7Y+s1bmyOX9UzXIAiNKDGTg4VZ5+ CSghtHDrF4C2w1noP0x1UYZSyiFobNLo8Dx5+XMLGQX1WcRyNpS7oMgY5UU37gRYetdM W6UcUgNFZtMbGKgByQs15tllCafLfwpUcAmDJdykRdw6UHv5fdsjz9L/jsXiy9vY3F7X IOHw== X-Gm-Message-State: ALoCoQn4ECF3WcEZ6wCJL7XB5if173UMSO8C+QP9WZMXMDFQXotTFP7iNzotcLkjMSRYFn707iY8 MIME-Version: 1.0 X-Received: by 10.202.202.4 with SMTP id a4mr14235318oig.5.1422961998497; Tue, 03 Feb 2015 03:13:18 -0800 (PST) Received: by 10.202.214.205 with HTTP; Tue, 3 Feb 2015 03:13:18 -0800 (PST) Received: by 10.202.214.205 with HTTP; Tue, 3 Feb 2015 03:13:18 -0800 (PST) In-Reply-To: References: <009b01d03f09$bd263e00$3772ba00$@tekwire.net> <00b401d03f11$d01d27f0$705777d0$@tekwire.net> Date: Tue, 3 Feb 2015 13:13:18 +0200 Message-ID: To: francois@tekwire.net Cc: internals@lists.php.net Content-Type: multipart/alternative; boundary=001a11c17ea87323f0050e2d2817 Subject: Re: [PHP-DEV] [VOTE] Feature request #38685: str_[i]replace(): Add support for (string needle, array replace) From: narf@devilix.net (Andrey Andreev) --001a11c17ea87323f0050e2d2817 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Feb 3, 2015 1:08 PM, "Andrey Andreev" wrote: > > Hi, > > On Mon, Feb 2, 2015 at 7:58 PM, Fran=C3=A7ois Laupretre wrote: > >> De : Andrey Andreev [mailto:narf@devilix.net] > >> > >> I seem to have missed the new parameter (and constants) addition > >> during the discussion ... sorry to say this, but that one would > >> probably fail the RFC. > > > > Mmh... I don't like the idea of adding a parameter but several people argued that we needed a way to control looping behavior, as the original idea was to loop through the replace array. > > > > But I am still hesitating. > > > > Instead of voting on the RFC, please tell me which behavior you prefer = : > > > > - an options argument to decide on the looping behavior, > > - always stopping replacements when the replace array is exhausted > > - always looping > > > > The other options are too exotic to become the default behavior. > > > > Always looping, the other option is already covered by strtr(). > I'd like control over the behavior too, but that just makes the API really ugly. > > Cheers, > Andrey. Or rather, should be covered by strtr(). Cheers, Andrey. --001a11c17ea87323f0050e2d2817--