Re: Array dereferencing of scalars
| From: | Yasuo Ohgaki | Date: | Tue, 09 Jun 2015 08:51:33 +0000 |
| Subject: | Re: Array dereferencing of scalars | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-86512@lists.php.net to get a copy of this message | ||
Hi all,
On Tue, Jun 9, 2015 at 6:21 AM, Stanislav Malyshev <smalyshev@gmail.com>
wrote:
> > Would throwing a notice or a warning on array deferencing scalars
> > be acceptable for PHP 7.0, or does this need an RFC?
>
> I think this does need an RFC, and for 7.0, pretty much no new language
> changes are acceptable anymore, since we're past the timeframe.
<?php
$foo = 42;
$foo['bar']; // => NULL
This code cannot be right.
How about fix this as a simple bug?
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net