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.
25 lines
556 B
25 lines
556 B
--TEST--
|
|
GH-19926 (Assertion failure zend_hash_internal_pointer_reset_ex)
|
|
--SKIPIF--
|
|
<?php die("skip AOT does not support throwing destructors during array_splice"); ?>
|
|
--FILE--
|
|
<?php
|
|
class ThrowingDestructor
|
|
{
|
|
function __destruct()
|
|
{
|
|
throw new Exception();
|
|
}
|
|
}
|
|
function main()
|
|
{
|
|
$arr = [new ThrowingDestructor(), new ThrowingDestructor()];
|
|
try {
|
|
array_splice($arr, 0, 2);
|
|
} catch (Exception $e) {
|
|
echo "Exception caught, no assertion failure\n";
|
|
}
|
|
}
|
|
?>
|
|
--EXPECT--
|
|
Exception caught, no assertion failure
|
|
|