summaryrefslogtreecommitdiff
path: root/Zend/tests/try/bug72213_2.phpt
blob: 790abe125d19d0253358dcf25cb27c8a9eb4d8e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--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