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 App\Providers; use Illuminate\Support\Collection; use Illuminate\Support..
Decoded Output download
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Support\ServiceProvider;
class MacroProvider extends ServiceProvider
{
public function boot(): void
{
Collection::macro('orderByArray', function (array $orderBy, string $key = 'id'): Collection {
/** @var Collection $this */
return $this->sortBy(static fn ($item) => array_search($item->$key, $orderBy, true));
});
}
}
?>
Did this file decode correctly?
Original Code
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Support\ServiceProvider;
class MacroProvider extends ServiceProvider
{
public function boot(): void
{
Collection::macro('orderByArray', function (array $orderBy, string $key = 'id'): Collection {
/** @var Collection $this */
return $this->sortBy(static fn ($item) => array_search($item->$key, $orderBy, true));
});
}
}
Function Calls
None |
Stats
MD5 | 93257d9e22b39a84a4ad5a09ae32d1ba |
Eval Count | 0 |
Decode Time | 95 ms |