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