summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72216.phpt
blob: 65b5556c705005cda75c698be5849b1842478586 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--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"