php-8.0.30-src/Zend/tests/nullsafe_operator/004.phpt

12 lines
196 B
PHP

--TEST--
Test nullsafe property assignment
--FILE--
<?php
$foo = null;
var_dump($foo?->bar = 'bar');
?>
--EXPECTF--
Fatal error: Can't use nullsafe operator in write context in %s.php on line 4