1--TEST-- 2Test nullsafe in list assign 3--FILE-- 4<?php 5 6class Foo { 7 public $bar; 8} 9 10class Bar { 11 public $baz; 12} 13 14$foo = new Foo(); 15$foo->bar = new Bar(); 16 17[$foo?->bar->baz] = ['bar']; 18var_dump($foo); 19 20?> 21--EXPECTF-- 22Fatal error: Assignments can only happen to writable values in %s on line %d 23