REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.03 KB
Close
/opt/cpanel/ea-wappspector/vendor/squizlabs/php_codesniffer/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc
Text
Base64
<?php $obj = new MyClass(); $obj =& new MyClass(); $obj = &new MyClass(); new MyClass(); $objects = array('one' => new MyClass()); $object->myFunction(new MyClass()); throw new MyException($msg); function foo() { return new MyClass(); } $doodad = $x ? new Foo : new Bar; function returnFn() { $fn = fn($x) => new MyClass(); } function returnMatch() { $match = match($x) { 0 => new MyClass() } } // Issue 3333. $time2 ??= new \DateTime(); $time3 = $time1 ?? new \DateTime(); $time3 = $time1 ?? $time2 ?? new \DateTime(); function_call($time1 ?? new \DateTime()); $return = function_call($time1 ?? new \DateTime()); // False negative depending on interpretation of the sniff. function returnViaTernary() { return ($y == false ) ? ($x === true ? new Foo : new Bar) : new FooBar; } function nonAssignmentTernary() { if (($x ? new Foo() : new Bar) instanceof FooBar) { // Do something. } } // Test for tokenizer issue #3789. $a = $b !== null ? match ($c) { default => 5, } : new Foo;
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 7
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
DisallowObjectStringIndexUnitTest.js
786 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
DisallowObjectStringIndexUnitTest.php
1.61 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
ObjectInstantiationUnitTest.inc
1.03 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
ObjectInstantiationUnitTest.php
1.41 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
ObjectMemberCommaUnitTest.js
963 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
ObjectMemberCommaUnitTest.js.fixed
959 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
ObjectMemberCommaUnitTest.php
1.40 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).