REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.26 KB
Close
/opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/PSR12/Tests/Classes/ClassInstantiationUnitTest.inc
Text
Base64
<?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'; }; $foo = new parent(); $foo = new parent; // PHP 8.3: safeguard that the sniff ignores anonymous classes, even when declared as readonly. $anon = new readonly class {}; $anon = new #[MyAttribute] readonly class {};
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 11
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
AnonClassDeclarationUnitTest.inc
1.49 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AnonClassDeclarationUnitTest.inc.fixed
1.48 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AnonClassDeclarationUnitTest.php
1.86 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ClassInstantiationUnitTest.inc
1.26 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ClassInstantiationUnitTest.inc.fixed
1.30 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ClassInstantiationUnitTest.php
1.69 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ClosingBraceUnitTest.inc
555 B
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ClosingBraceUnitTest.php
1.42 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OpeningBraceSpaceUnitTest.inc
432 B
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OpeningBraceSpaceUnitTest.inc.fixed
423 B
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
OpeningBraceSpaceUnitTest.php
1.44 KB
lrw-r--r--
2025-11-04 16:30:35
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).