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.
20 lines
329 B
20 lines
329 B
--TEST--
|
|
Bug #22463 (array_reduce() segfaults)
|
|
--FILE--
|
|
<?php
|
|
function a($ary)
|
|
{
|
|
return is_array($ary) ? array_reduce($ary, 'cb', 0) : 1;
|
|
}
|
|
function cb($v, $elem)
|
|
{
|
|
return $v + a($elem);
|
|
}
|
|
function main()
|
|
{
|
|
$ary = array(array(array(array(array(array(0, 1, 2, 3, 4))))));
|
|
var_dump(a($ary));
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
int(5)
|
|
|