(off topic) Array to string conversion (Was: Re: [PHP-DEV] Scalar Type Hints v0.4)
| From: | Patrick ALLAERT | Date: | Thu, 19 Feb 2015 09:21:33 +0000 |
| Subject: | (off topic) Array to string conversion (Was: Re: [PHP-DEV] Scalar Type Hints v0.4) | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-83163@lists.php.net to get a copy of this message | ||
Le Thu Feb 19 2015 at 00:38:25, François Laupretre <francois@php.net> a
écrit :
> This is definitely not the same case as generating a notice on array to
> string (and why did you generate a notice instead of E_DEPRECATE, we would
> be rid of this crap now).
>
I haven't decided that without discussing [1] it.
E_DEPRECATED is meant for something that may/will not work in the future
and the plan was not to stop converting arrays as the string "Array" when
it happens.
Moreover, no other "bad" conversion used E_DEPRECATED and it would have
been inconsistent IMO.
Note that there is room for improvements considering that "weird"
conversions are using one of E_NOTICE, E_WARNING, E_ERROR
or E_RECOVERABLE_ERROR depending on the case.
Feel free to propose something in this regard, I'm all for consistencies,
provided that it gives a sufficient amount of BC.
Regards,
Patrick
[1] http://marc.info/?l=php-internals&m=130709981705863