Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace Facades; use App\DummyFacade; use Illuminate\Support\Facades\DB; use Ill..
Decoded Output download
<?php
namespace Facades;
use App\DummyFacade;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Storage;
use function PHPStan\TestingssertType;
function test(): void
{
assertType('Illuminate\Http\Request', Request::instance());
assertType('null', Event::assertDispatched('FooEvent'));
assertType('null', Event::assertDispatchedTimes('FooEvent', 5));
assertType('null', Event::assertNotDispatched('FooEvent'));
$redis = Redis::connection();
assertType('(array|Redis|false)', $redis->lrange('some-key', 0, -1));
assertType('(array|Redis|false)', Redis::lrange('some-key', 0, -1));
assertType('(bool|Redis)', Redis::expire('foo', 3));
assertType('(array<string, mixed>|Redis|false)', Redis::hmget('h', ['field1', 'field2']));
assertType('Illuminate\Database\Query\Builder', DB::query());
assertType('int', DB::transactionLevel());
assertType('null', Queue::createPayloadUsing(function () {
}));
assertType('Psr\Log\LoggerInterface', Log::getLogger());
assertType('Illuminate\Filesystem\FilesystemAdapter', Storage::disk());
assertType('Illuminate\Filesystem\FilesystemAdapter', Storage::drive());
assertType('bool', Storage::disk()->deleteDirectory('foo'));
assertType('bool', Storage::drive()->deleteDirectory('foo'));
assertType('string|false', Storage::putFile('foo', 'foo/bar'));
assertType('mixed', Redis::get('foo'));
assertType('string', DummyFacade::foo());
assertType('int', DummyFacade::bar());
}
?>
Did this file decode correctly?
Original Code
<?php
namespace Facades;
use App\DummyFacade;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Queue;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Request;
use Illuminate\Support\Facades\Storage;
use function PHPStan\Testing\assertType;
function test(): void
{
assertType('Illuminate\Http\Request', Request::instance());
assertType('null', Event::assertDispatched('FooEvent'));
assertType('null', Event::assertDispatchedTimes('FooEvent', 5));
assertType('null', Event::assertNotDispatched('FooEvent'));
$redis = Redis::connection();
assertType('(array|Redis|false)', $redis->lrange('some-key', 0, -1));
assertType('(array|Redis|false)', Redis::lrange('some-key', 0, -1));
assertType('(bool|Redis)', Redis::expire('foo', 3));
assertType('(array<string, mixed>|Redis|false)', Redis::hmget('h', ['field1', 'field2']));
assertType('Illuminate\Database\Query\Builder', DB::query());
assertType('int', DB::transactionLevel());
assertType('null', Queue::createPayloadUsing(function () {
}));
assertType('Psr\Log\LoggerInterface', Log::getLogger());
assertType('Illuminate\Filesystem\FilesystemAdapter', Storage::disk());
assertType('Illuminate\Filesystem\FilesystemAdapter', Storage::drive());
assertType('bool', Storage::disk()->deleteDirectory('foo'));
assertType('bool', Storage::drive()->deleteDirectory('foo'));
assertType('string|false', Storage::putFile('foo', 'foo/bar'));
assertType('mixed', Redis::get('foo'));
assertType('string', DummyFacade::foo());
assertType('int', DummyFacade::bar());
}
Function Calls
None |
Stats
MD5 | a0392312d60dcd415ab2708d505ba570 |
Eval Count | 0 |
Decode Time | 118 ms |