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.
32 lines
777 B
32 lines
777 B
--TEST--
|
|
Bug #35821 (array_map() segfaults when exception is throwed from the callback)
|
|
--SKIPIF--
|
|
<?php die("skip AOT array_map with exception in callback differs from PHP"); ?>
|
|
--FILE--
|
|
<?php
|
|
class Element
|
|
{
|
|
public function ThrowException()
|
|
{
|
|
throw new Exception();
|
|
}
|
|
public static function CallBack(Element $elem)
|
|
{
|
|
$elem->ThrowException();
|
|
}
|
|
}
|
|
function main()
|
|
{
|
|
$arr = array(new Element(), new Element(), new Element());
|
|
array_map(array('Element', 'CallBack'), $arr);
|
|
echo "Done\n";
|
|
}
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Uncaught Exception in %s:%d
|
|
Stack trace:
|
|
#0 %s(%d): Element->ThrowException()
|
|
#1 [internal function]: Element::CallBack(Object(Element))
|
|
#2 %s(%d): array_map(Array, Array)
|
|
#3 {main}
|
|
thrown in %s on line %d
|
|
|