xref: /php-src/Zend/tests/try/bug72213_2.phpt (revision 7aacc705)
1--TEST--
2Bug #72213 (Finally leaks on nested exceptions)
3--FILE--
4<?php
5function test() {
6    try {
7        throw new Exception(1);
8    } finally {
9        try {
10            try {
11                throw new Exception(2);
12            } finally {
13            }
14        } catch (Exception $e) {
15        }
16    }
17}
18
19try {
20    test();
21} catch (Exception $e) {
22    echo "caught {$e->getMessage()}\n";
23}
24?>
25--EXPECT--
26caught 1
27