mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
New test
This commit is contained in:
parent
2705d17c93
commit
10a3260b1f
13
Zend/tests/foreach_007.phpt
Normal file
13
Zend/tests/foreach_007.phpt
Normal file
@ -0,0 +1,13 @@
|
||||
--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
|
Loading…
Reference in New Issue
Block a user