mirror of
https://github.com/php/php-src.git
synced 2024-12-21 16:00:18 +08:00
3b8cb2119b
Fixed bug #72216 (Return by reference with finally is not memory safe) Fixed bug #72215 (Wrong return value if var modified in finally)
17 lines
249 B
PHP
17 lines
249 B
PHP
--TEST--
|
|
Bug #72216 (Return by reference with finally is not memory safe)
|
|
--FILE--
|
|
<?php
|
|
function &test() {
|
|
$a = ["ok"];
|
|
try {
|
|
return $a[0];
|
|
} finally {
|
|
$a[""] = 42;
|
|
}
|
|
}
|
|
var_dump(test());
|
|
?>
|
|
--EXPECT--
|
|
string(2) "ok"
|