Re: Disable autovivification on false
| From: | Christian Schneider | Date: | Tue, 25 May 2021 17:12:29 +0000 |
| Subject: | Re: Disable autovivification on false | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-114596@lists.php.net to get a copy of this message | ||
Am 25.05.2021 um 18:23 schrieb Kamil Tekiela <tekiela246@gmail.com>:
> I'd like to start a discussion on the following RFC
> https://wiki.php.net/rfc/autovivification_false
> Particularly, I am looking for opinions on whether this behaviour should be
> left alone, should be disabled on false, or should be disabled on null and
> false, and left only for undefined variables.
>
> Autovivification is very useful in PHP, especially with multidimensional
> arrays and loops. However, the question is should we allow it on false and
> null values going forward.
I feel like a broken record, but I have to say it (again):
Please add an E_WARNING step before changing something that used to be silent to an error. For
easier migration.
Thanks,
- Chris