Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80202 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73537 invoked from network); 5 Jan 2015 22:03:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 22:03:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.181 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.212.181 mail-wi0-f181.google.com Received: from [209.85.212.181] ([209.85.212.181:34569] helo=mail-wi0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/D9-21693-D1A0BA45 for ; Mon, 05 Jan 2015 17:03:10 -0500 Received: by mail-wi0-f181.google.com with SMTP id r20so4223081wiv.14 for ; Mon, 05 Jan 2015 14:03:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=M7drmyQirRo7ErGEnDO6WJ2lTbOwxVPcvIB/E4M6HKw=; b=PUTIw+HWJZGWZkPgEPSSAv/M6mRPDoPsyztXgiut6KX5Mq9X1ISXI64KN2kGknekMJ kPuUSCMem5tqpasUH4BdTQIjgBA0HLoWJAoOl+85qIwUSDo1WBBH1WW9xWDYKZNvQf6V bTXFr261p9eqv3xlWQmFFHSI4KcuGk9W7hm3b9bJJBaPaWok4easqpgppNEl5JcanPqj zgtEhHmfK3ckTAuNWCqC/jX5XblkLCtlt+ICThFon1lmFcZYklI/FS6RO+UInYVj2PdJ DfHDO+TqX23bDPBFL7Vea67xHWd6zn92OrlfqHpyChFSM+IBx9+I/0wefUXUzoFkSOi6 ZDbQ== MIME-Version: 1.0 X-Received: by 10.180.91.193 with SMTP id cg1mr30335319wib.26.1420495385443; Mon, 05 Jan 2015 14:03:05 -0800 (PST) Received: by 10.180.88.33 with HTTP; Mon, 5 Jan 2015 14:03:05 -0800 (PST) In-Reply-To: <54AAF3DE.2050508@gmail.com> References: <003e01d0290b$2387dd30$6a979790$@yahoo.fr> <54AAF3DE.2050508@gmail.com> Date: Mon, 5 Jan 2015 23:03:05 +0100 Message-ID: To: Stanislav Malyshev Cc: Andrea Faulds , nf.laupretre@yahoo.fr, PHP Internals Content-Type: multipart/alternative; boundary=f46d041c408edac3ea050beeda59 Subject: Re: [PHP-DEV] [BugFest] Feature request #38685: str_[i]replace(): Add support for (string needle, array replace) From: tyra3l@gmail.com (Ferenc Kovacs) --f46d041c408edac3ea050beeda59 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 5, 2015 at 9:28 PM, Stanislav Malyshev wrote: > Hi! > > > usually each BC break would warrant an RFC and a vote, but I'm not sure > > many people would use str_replace("foo", array("bar"), $subject); and > > expect the implicit array to string conversion of array("bar") =3D> "Ar= ray" > > which also emits a notice. > > let's see what others think. > > I wouldn't consider this a BC break. Anybody who relies on implicit > array->string conversion has a bug anyway, and we allow that implicit > conversion to survive only for legacy reasons, but I don't think it > should drag behind itself the promise we'd never support array parameter > where there was only string before. In summary, I'd say no BC break here. > -- > Stas Malyshev > smalyshev@gmail.com > depends on one's definition of bc. mine is that changing anything which isn't explicitly documented otherwise or as as undefined behavior is a bc break. as I mentioned I agree that there should be no otherwise correct code which depends on this behavior (yet we have seen people complaning about BC break when we originally introduced the notice on implicit array -> string cast in php 5.4.0) so I would possibly vote yes on this. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --f46d041c408edac3ea050beeda59--