php-src/Zend/tests/try/bug72213_2.phpt
2020-08-09 22:03:36 +02:00

27 lines
418 B
PHP

--TEST--
Bug #72213 (Finally leaks on nested exceptions)
--FILE--
<?php
function test() {
try {
throw new Exception(1);
} finally {
try {
try {
throw new Exception(2);
} finally {
}
} catch (Exception $e) {
}
}
}
try {
test();
} catch (Exception $e) {
echo "caught {$e->getMessage()}\n";
}
?>
--EXPECT--
caught 1