Description
The following code:
<?php
$all = ['test'];
foreach ($all as &$item) {
$all += [$item];
}
var_dump($all);
Resulted in this output:
But I expected this output instead:
array(1) {
[0]=>
&string(4) "test"
}
PHP Version
PHP 8.2.6RC1
Operating System
Debian 11.7