mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
22 lines
278 B
Plaintext
22 lines
278 B
Plaintext
|
--TEST--
|
||
|
Bug #72215.1 (Wrong return value if var modified in finally)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
function &test(&$b) {
|
||
|
$a =& $b;
|
||
|
try {
|
||
|
return $a;
|
||
|
} finally {
|
||
|
$a = 2;
|
||
|
}
|
||
|
}
|
||
|
$x = 1;
|
||
|
$y =& test($x);
|
||
|
var_dump($y);
|
||
|
$x = 3;
|
||
|
var_dump($y);
|
||
|
?>
|
||
|
--EXPECT--
|
||
|
int(2)
|
||
|
int(3)
|