xref: /php-src/Zend/tests/foreach/foreach_007.phpt (revision 275f63e7)
1--TEST--
2Foreach by reference and inserting new element when we are already at the end
3--FILE--
4<?php
5$a = [1];
6foreach($a as &$v) {
7    echo "$v\n";
8    $a[1]=2;
9}
10?>
11--EXPECT--
121
132
14