Re: [BugFest] Feature request #38685: str_[i]replace(): Add support for (string needle, array replace)
| From: | Stanislav Malyshev | Date: | Mon, 05 Jan 2015 20:28:14 +0000 |
| Subject: | Re: [BugFest] Feature request #38685: str_[i]replace(): Add support for (string needle, array replace) | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-80197@lists.php.net to get a copy of this message | ||
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") =>
> "Array"
> 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