array_append() And Short Assignation

no-email (Damien Seguy), Damien Seguy
Tue, 28 Nov 2023 00:00:00 +0000

PHP allows using short assignation operators with the array append operators. This means that the code adds ``2`` to the array append. No error is displayed, except in the case of ``??=``, who is yield a Fatal error, with an explicit "Cannot use [] for reading".
In any case, all of those expressions make little sense : the short assignation operators shall exist on an existing value, not a new one. Here, it looks like the default value is null.