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.
28 lines
436 B
28 lines
436 B
--TEST--
|
|
Bug #69068: Exchanging array during array_walk -> memory errors
|
|
--SKIPIF--
|
|
<?php die("skip AOT array_walk array modification differs from PHP"); ?>
|
|
--FILE--
|
|
<?php
|
|
|
|
$array = [1, 2, 3];
|
|
array_walk($array, function($value, $key) {
|
|
var_dump($value);
|
|
if ($value == 2) {
|
|
$GLOBALS['array'] = [4, 5];
|
|
}
|
|
});
|
|
var_dump($array);
|
|
|
|
?>
|
|
--EXPECT--
|
|
int(1)
|
|
int(2)
|
|
int(4)
|
|
int(5)
|
|
array(2) {
|
|
[0]=>
|
|
int(4)
|
|
[1]=>
|
|
int(5)
|
|
}
|
|
|