Re: [PHP-DEV] Re: Undefined variables and the array append operator

2022-03-30 Thread Hans Henrik Bergan
> RFC. There are other inconsistencies as well now, depending on how the undefined variable comes to exist absolutely, but shouldn't try to do too much in a single rfc, wouldn't want it to be rejected for the wrong reasons ^^ On Wed, 30 Mar 2022 at 12:17, Björn Larsson via internals < internals@l

[PHP-DEV] Re: Undefined variables and the array append operator

2022-03-30 Thread Björn Larsson via internals
Den 2022-03-29 kl. 21:44, skrev Rowan Tommins: Hi all, If $foo is not defined, statements such as $foo += 1 and $foo .= 'blah' raise "undefined variable" Warnings in PHP 8, and will throw Errors in PHP 9. However, the very similar looking $foo[] = 1 succeeds silently. This seems odd to me, a