summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72215_2.phpt
blob: 029bf874fe8bfc4fa9f1eb56bf0d0aa9ddbcb961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Bug #72215.1 (Wrong return value if var modified in finally)
--FILE--
<?php
function &test(&$b) {
    $a =& $b;
    try {
        return $a;
    } finally {
        $a =& $c;
    $a = 2;
    }
}
$x = 1;
$y =& test($x);
var_dump($y);
$x = 3;
var_dump($y);
?>
--EXPECT--
int(1)
int(3)