xref: /PHP-7.4/Zend/tests/foreach_012.phpt (revision d679f022)
1--TEST--
2array_walk() function precerve foreach by reference iterator pointer
3--FILE--
4<?php
5$a = [1,2,3,4,5];
6foreach($a as &$v) {
7	echo "$v\n";
8	if ($v == 3) {
9		array_walk($a, function (&$x) {$x+=10;});
10	}
11}
12?>
13--EXPECT--
141
152
163
1714
1815
19