1--TEST--
2Test nullsafe in sub-chain of function argument
3--FILE--
4<?php
5
6function takes_ref(&$foo) {
7    $foo = 'foo';
8}
9
10function &returns_ref($ref) {
11    global $foo;
12    return $foo;
13}
14
15global $foo;
16
17$null = null;
18takes_ref(returns_ref($null?->null()));
19var_dump($foo);
20
21?>
22--EXPECT--
23string(3) "foo"
24