php-src/ext/opcache/tests/ssa_bug_005.phpt

25 lines
319 B
Plaintext
Raw Normal View History

--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