OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
tests
/
Fixtures
/
PHP
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:54 AM
rwxr-xr-x
📄
AbstractKeyword.php
552 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
AnonymousFunctions.php
1.72 KB
08/07/2024 04:34:53 AM
rw-r--r--
📁
Enums
-
08/07/2024 04:35:09 AM
rwxr-xr-x
📁
Inheritance
-
08/07/2024 04:35:09 AM
rwxr-xr-x
📄
Label.php
315 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
MultipleFunctions.php
547 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
Php8AttrMix.php
396 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
Php8NamedArguments.php
1004 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
Php8PromotedProperties.php
481 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
References.php
300 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
ReferencesEnum.php
3.36 KB
08/07/2024 04:34:53 AM
rw-r--r--
📄
namespaces1.php
135 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
namespaces2.php
163 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
php7.php
749 bytes
08/07/2024 04:34:53 AM
rw-r--r--
📄
php8.php
435 bytes
08/07/2024 04:34:53 AM
rw-r--r--
Editing: AnonymousFunctions.php
Close
<?php declare(strict_types=1); /** * @license Apache 2.0 */ namespace OpenApi\Tests\Fixtures\PHP; use OpenApi\Annotations as OA; /** * @OA\Info(title="Foobar", version="1.0") */ class AnonymousFunctions { public function index($ding) { array_map(static function ($item) use ($ding) { return ''; }, []); } protected function query() { return new class() { public function leftJoin(string $foo, callable $callback) { return $this; } }; } public function other() { return $this->query() ->leftJoin('foo', function ($join) { $join->on('user.foo_id', 'foo.id'); }) ->leftJoin('bar', function ($join) { $join->on('user.bar_id', 'bar.id'); }) ->get(); } public function shortFn(): callable { return fn () => strlen('3'); } public function staticShortFn(): callable { return static fn () => strlen('3'); } public function withUse($foo): callable { return function () use ($foo) { return false; }; } public function dollarCurly1(string $key = 'xx') { preg_replace("/:{$key}/", 'y', 'abx'); return $this->shortFn(); } public function dollarCurly2(string $key = 'xx') { preg_replace("/:{$key}/", 'y', 'abx'); array_map(static function ($issue) use ($key) { return $issue; }, []); } public function curlyOpen(string $key = 'xx') { $s = "a {$key}"; array_map(static function ($issue) use ($key) { return $issue; }, []); } }