php-8.0.30-src/Zend/tests/try/bug70228_2.phpt

21 lines
300 B
PHP

--TEST--
Bug #70228 (memleak if return in finally block)
--FILE--
<?php
function test() {
try {
throw new Exception(1);
} finally {
try {
throw new Exception(2);
} finally {
return 42;
}
}
}
var_dump(test());
?>
--EXPECT--
int(42)