mirror of
https://github.com/php/php-src.git
synced 2024-12-17 22:09:12 +08:00
21 lines
308 B
PHP
21 lines
308 B
PHP
--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
|