summaryrefslogtreecommitdiff
path: root/Zend/tests/try/bug70228.phpt
blob: 8b812517a30545f2f58128207812b444a270c3b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--TEST--
Bug #70228 (memleak if return in finally block)
--FILE--
<?php

function foo() {
    try { return str_repeat("a", 2); }
    finally { return str_repeat("b", 2); }
}

var_dump(foo());
?>
--EXPECT--
string(2) "bb"