mirror of
https://github.com/php/php-src.git
synced 2024-09-21 18:07:23 +00:00
7aacc705d0
Closes GH-5958
20 lines
291 B
PHP
20 lines
291 B
PHP
--TEST--
|
|
Test nullsafe lhs of assignment to nested property chain
|
|
--FILE--
|
|
<?php
|
|
|
|
class Foo {
|
|
public $bar;
|
|
}
|
|
|
|
function bar() {
|
|
var_dump('called');
|
|
}
|
|
|
|
$foo = null;
|
|
$foo?->bar->baz = bar();
|
|
|
|
?>
|
|
--EXPECTF--
|
|
Fatal error: Can't use nullsafe operator in write context in %s.php on line 12
|