TypePHP 编译器
https://swoole.com/aot/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
481 B
30 lines
481 B
--TEST--
|
|
Bug #61967: unset array item in array_walk_recursive cause inconsistent array
|
|
--SKIPIF--
|
|
<?php
|
|
if (true) die("skip AOT does not support reference parameters in closures");
|
|
?>
|
|
|
|
--FILE--
|
|
<?php
|
|
$arr = array(
|
|
range(1, 5),
|
|
range(1, 5),
|
|
range(1, 5),
|
|
range(1, 5),
|
|
range(1, 5),
|
|
);
|
|
|
|
array_walk_recursive($arr,
|
|
function (&$value, $key) use(&$arr) {
|
|
var_dump($key);
|
|
unset($arr[$key]);
|
|
}
|
|
);
|
|
?>
|
|
--EXPECT--
|
|
int(0)
|
|
int(1)
|
|
int(2)
|
|
int(3)
|
|
int(4)
|
|
|