php-src/Zend/tests/foreach_007.phpt
2020-02-03 22:52:20 +01:00

14 lines
183 B
PHP

--TEST--
Foreach by reference and inserting new element when we are already at the end
--FILE--
<?php
$a = [1];
foreach($a as &$v) {
echo "$v\n";
$a[1]=2;
}
?>
--EXPECT--
1
2