php-src/Zend/tests/gh11171.phpt
Ilija Tovilo dc20cd9c3a
Endless recursion when using + on array in foreach
This reverts commit 84b4020eb4.

Fixes GH-11171
2023-05-01 13:20:58 +02:00

16 lines
177 B
PHP

--TEST--
GH-11171: Test
--FILE--
<?php
$all = ['test'];
foreach ($all as &$item) {
$all += [$item];
}
var_dump($all);
?>
--EXPECT--
array(1) {
[0]=>
&string(4) "test"
}