Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
primogenial
/
wp-content
/
themes
/
storefront
/
vendor
/
squizlabs
/
php_codesniffer
/
src
/
Standards
/
PSR12
/
Tests
/
Classes
:
ClassInstantiationUnitTest.inc.fixed
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
<?php $foo = new Foo(); $foo = new Foo(); $foo = new Foo\Bar(); $foo = new Foo\Bar(); $foo = new Foo /* comment */ (); $foo = new $foo(); $foo = new $foo(); $foo = new $$foo(); $foo = new $$foo(); $foo = new self(); $foo = new self(); $foo = new static(); $foo = new static(); foo(new class {}); echo (new Foo())->bar(); echo (new Foo())->bar(); echo (new Foo((new Bar())->getBaz()))->bar(); $foo = (new Foo())::$bar; echo (new Foo((new Bar()//comment )->getBaz(new Baz() /* comment */)))->bar(); $foo = new $bar['a'](); $foo = new $bar['a']['b'](); $foo = new $bar['a'][$baz['a']['b']]['b'](); $foo = new $bar['a'] [$baz['a']/* comment */ ['b']]['b'](); $a = new self::$transport[$cap_string](); $renderer = new $this->inline_diff_renderer(); $a = new ${$varHoldingClassName}(); $class = new $obj?->classname(); $class = new $obj?->classname(); $class = new ${$obj?->classname}(); // Issue 3456. // Anon classes should be skipped, even when there is an attribute between the new and the class keywords. $anonWithAttribute = new #[SomeAttribute('summary')] class { public const SOME_STUFF = 'foo'; };