Re: Re: [RFC][VOTE] E_WARNING on invalid container read-adccess
| From: | Marco Pivetta | Date: | Wed, 31 Aug 2016 10:34:53 +0000 |
| Subject: | Re: Re: [RFC][VOTE] E_WARNING on invalid container read-adccess | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-95516@lists.php.net to get a copy of this message | ||
Ah, thanks, I thought it was silently passing :-)
On 31 Aug 2016 12:10 p.m., "Dmitry Stogov" <dmitry@zend.com> wrote:
> no. if you would try the proposed PR with this code, you would see:
>
>
> Fatal error: Uncaught Error: Unsupported operand types
>
> ------------------------------
> *From:* Marco Pivetta <ocramius@gmail.com>
> *Sent:* Wednesday, August 31, 2016 10:10:23 AM
> *To:* Dmitry Stogov
> *Cc:* Christoph M. Becker; PHP Internals List; Nikita Popov; David Walker
> *Subject:* Re: [PHP-DEV] Re: [RFC][VOTE] E_WARNING on invalid container
> read-adccess
>
>
> Hi Dmitry,
>
> On 31 Aug 2016 8:37 a.m., "Dmitry Stogov" <dmitry@zend.com> wrote:
> >
> > I vote NO, because the implementation introduces more problems than
> intents to fix.
> >
> > For example the following code starts to throw exception:
> >
> >
> > <?php $a = [null]; $c = null; var_dump($a[0][0] + $c[0]); ?>
>
> Isn't that the point of this RFC?
> I would expect this code to only ever work by accident.
>