mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
* Zend/*: fix a bunch of typos * Zend/tests/try/try_catch_finally_005.phpt: update string length
19 lines
252 B
PHP
19 lines
252 B
PHP
--TEST--
|
|
array_walk() function preserve foreach by reference iterator pointer
|
|
--FILE--
|
|
<?php
|
|
$a = [1,2,3,4,5];
|
|
foreach($a as &$v) {
|
|
echo "$v\n";
|
|
if ($v == 3) {
|
|
array_walk($a, function (&$x) {$x+=10;});
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
1
|
|
2
|
|
3
|
|
14
|
|
15
|