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.
 
 

23 lines
622 B

--TEST--
Bug #52719: array_walk_recursive crashes if third param of the function is by reference
--SKIPIF--
<?php
if (true) die("skip AOT does not support reference parameters in closures");
?>
--FILE--
<?php
$array = array("hello", array("world"));
$userdata = array();
array_walk_recursive(
$array,
function ($value, $key, &$userdata) { },
$userdata
);
echo "Done";
?>
--EXPECTF--
Warning: {closure:%s:%d}(): Argument #3 ($userdata) must be passed by reference, value given in %s on line %d
Warning: {closure:%s:%d}(): Argument #3 ($userdata) must be passed by reference, value given in %s on line %d
Done