mirror of
https://github.com/php/php-src.git
synced 2024-09-22 18:37:25 +00:00
25 lines
319 B
Plaintext
25 lines
319 B
Plaintext
|
--TEST--
|
||
|
Assign elision exception safety: UCALL
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
function test() {
|
||
|
$dtor = new class { function __destruct() { throw new Exception; } };
|
||
|
$a = 1;
|
||
|
return [0, $a];
|
||
|
}
|
||
|
|
||
|
function test2() {
|
||
|
$x = test();
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
test2();
|
||
|
} catch (Exception $e) {
|
||
|
echo "caught\n";
|
||
|
}
|
||
|
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
caught
|