mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
RFC: https://wiki.php.net/rfc/nullsafe_operator Closes GH-5619. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
13 lines
199 B
PHP
13 lines
199 B
PHP
--TEST--
|
|
Test return nullsafe as ref
|
|
--FILE--
|
|
<?php
|
|
|
|
function &get_bar_ref($foo) {
|
|
return $foo?->bar;
|
|
}
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Cannot take reference of a nullsafe chain in %s.php on line 4
|