--TEST-- Assign coalesce: All calls should be memoized --FILE-- foo()->foo()->{$foo->bar()} ??= 42; var_dump($foo); $foo->foo()->baz ??= 42; ?> --EXPECT-- bar foo array(1) { ["bar"]=> int(42) } Foo::foo Foo::foo Foo::bar object(Foo)#1 (1) { ["prop"]=> int(42) } Foo::foo Foo::__isset Foo::__set int(42)