(new MyClass())::CONSTANT; $b = (new MyClass())::staticMethod(); $c = (new $myClass())->property; $d = (new $myClass())?->method(); $e = (new (trim(' MyClass '))())['key']; ]]> ::CONSTANT; $b = new MyClass()::staticMethod(); $c = new $myClass()->property; $d = new $myClass()?->method(); $e = new (trim(' MyClass '))()['key']; ]]> (new class { const CONSTANT = 'constant'; })::CONSTANT; $anon = (new class { public $property = 'property'; })->property; $anon = (new class { public function method() { return 'method'; } })->method(); $anon = (new class (['value']) extends ArrayObject {})[0]; ]]> ::CONSTANT; $anon = new class { public $property = 'property'; }->property; $anon = new class { public function method() { return 'method'; } }->method(); $anon = new class (['value']) extends ArrayObject {}[0]; ]]>