Re: [RFC] Raise warnings for json_encode() and json_decode() issues
| From: | Craig Duncan | Date: | Fri, 28 Jul 2017 11:23:44 +0000 |
| Subject: | Re: [RFC] Raise warnings for json_encode() and json_decode() issues | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100074@lists.php.net to get a copy of this message | ||
Hi Nikita,
Thanks for your input. Would you vote yes for throwing an exception?
On 28 July 2017 at 12:07, Nikita Popov <nikita.ppv@gmail.com> wrote:
>
> Operations that are expected to fail should never generate warnings. We
> should not design functions such that their correct use requires the use of
> the error suppression operator.
>
> I certainly agree that the current situation is not good and that the json
> functions really ought to be throwing exceptions, but adding a warning now
> is only going to make this worse.
>
> Nikita
>
>