mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
19 lines
275 B
PHP
19 lines
275 B
PHP
--TEST--
|
|
Bug #70228 (memleak if return in finally block)
|
|
--FILE--
|
|
<?php
|
|
function test($x) {
|
|
foreach ($x as $v) {
|
|
try {
|
|
return str_repeat("a", 2);
|
|
} finally {
|
|
return 42;
|
|
}
|
|
}
|
|
}
|
|
|
|
var_dump(test([1]));
|
|
?>
|
|
--EXPECT--
|
|
int(42)
|