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 declare(strict_types=1); use App\Interfaces\MigrationInterface; use App\Services\D..
Decoded Output download
<?php
declare(strict_types=1);
use App\Interfaces\MigrationInterface;
use App\Services\DB;
return new class() implements MigrationInterface {
public function up(): int
{
DB::getPdo()->exec("
CREATE TABLE IF NOT EXISTS `syslog` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '',
`ip` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP',
`message` varchar(1024) NOT NULL DEFAULT '' COMMENT '',
`level` tinyint(3) unsigned NOT NULL DEFAULT 100 COMMENT '',
`context` longtext NOT NULL DEFAULT '{}' COMMENT '' CHECK (json_valid(`context`)),
`channel` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`datetime` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `ip` (`ip`),
KEY `message` (`message`),
KEY `level` (`level`),
KEY `channel` (`channel`),
KEY `datetime` (`datetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
return 2024041000;
}
public function down(): int
{
DB::getPdo()->exec('
DROP TABLE IF EXISTS `syslog`;
');
return 2024040500;
}
};
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
use App\Interfaces\MigrationInterface;
use App\Services\DB;
return new class() implements MigrationInterface {
public function up(): int
{
DB::getPdo()->exec("
CREATE TABLE IF NOT EXISTS `syslog` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '',
`ip` varchar(255) NOT NULL DEFAULT '' COMMENT 'IP',
`message` varchar(1024) NOT NULL DEFAULT '' COMMENT '',
`level` tinyint(3) unsigned NOT NULL DEFAULT 100 COMMENT '',
`context` longtext NOT NULL DEFAULT '{}' COMMENT '' CHECK (json_valid(`context`)),
`channel` varchar(255) NOT NULL DEFAULT '' COMMENT '',
`datetime` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `ip` (`ip`),
KEY `message` (`message`),
KEY `level` (`level`),
KEY `channel` (`channel`),
KEY `datetime` (`datetime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
");
return 2024041000;
}
public function down(): int
{
DB::getPdo()->exec('
DROP TABLE IF EXISTS `syslog`;
');
return 2024040500;
}
};
Function Calls
None |
Stats
MD5 | 14240bbca92a48341d88e3924805a362 |
Eval Count | 0 |
Decode Time | 108 ms |