1--TEST--
2Test return nullsafe as ref
3--FILE--
4<?php
5
6function &get_bar_ref($foo) {
7    return $foo?->bar;
8}
9
10?>
11--EXPECTF--
12Fatal error: Cannot take reference of a nullsafe chain in %s.php on line 4
13