mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
7aacc705d0
Closes GH-5958
27 lines
418 B
PHP
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
|