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