php-src/Zend/tests/nullsafe_operator/009.phpt
Ilija Tovilo 9bf119832d
Implement nullsafe ?-> operator
RFC: https://wiki.php.net/rfc/nullsafe_operator

Closes GH-5619.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
2020-07-24 10:05:03 +02:00

12 lines
184 B
PHP

--TEST--
Test fetch nullsafe property by ref
--FILE--
<?php
$foo = null;
$ref = &$foo?->bar
?>
--EXPECTF--
Fatal error: Cannot take reference of a nullsafe chain in %s.php on line 4