summaryrefslogtreecommitdiff
path: root/Zend/tests/try/bug70228_5.phpt
blob: 29cbf4910de11e5ace240ffcaddcb4c8e91826cd (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 hidden by throw in finally block)
--FILE--
<?php
function test() {
    try {
        return str_repeat("a", 2);
    } finally {
        throw new Exception("ops");
    }
}

try {
    test();
} catch (Exception $e) {
    echo $e->getMessage(), "\n";
}
?>
--EXPECT--
ops