xref: /PHP-7.0/Zend/tests/foreach_014.phpt (revision 97fe15db)
1--TEST--
2array_pop() function precerve foreach by reference iterator pointer
3--FILE--
4<?php
5$a = [1,2,3];
6foreach($a as &$v) {
7	echo "$v\n";
8	if ($v == 2) {
9		array_pop($a);
10	}
11}
12?>
13--EXPECT--
141
152
16