1--TEST--
2Memory leak in JMP_NULL
3--FILE--
4<?php
5function &returns_ref($unused) {
6    global $foo;
7    return $foo;
8}
9
10function &returns_ref2() {
11    return returns_ref(returns_ref(null)?->null);
12}
13
14$foo2 = &returns_ref2();
15$foo2 = 'foo';
16var_dump($foo);
17?>
18--EXPECT--
19string(3) "foo"
20