Added test

This commit is contained in:
Dmitry Stogov 2016-05-24 02:59:27 +03:00
parent 4c6aa93d43
commit cfcedf2fb4

View file

@ -0,0 +1,32 @@
--TEST--
Bug #70228 (memleak if return in finally block)
--FILE--
<?php
function test() {
try {
throw new Exception(1);
} finally {
try {
try {
try {
} finally {
return 42;
}
} finally {
throw new Exception(3);
}
} catch (Exception $e) {}
}
}
try {
var_dump(test());
} catch (Exception $e) {
do {
echo $e->getMessage() . "\n";
$e = $e->getPrevious();
} while ($e);
}
?>
--EXPECT--
1