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 `hourly_usage` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'ID',
`date` date NOT NULL DEFAULT 0 COMMENT '',
`usage` longtext NOT NULL DEFAULT '{}' COMMENT '' CHECK (json_valid(`usage`)),
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `user_hourly_usage`;
");
return 2024012700;
}
public function down(): int
{
DB::getPdo()->exec("
CREATE TABLE IF NOT EXISTS `user_hourly_usage` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'ID',
`traffic` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '',
`hourly_usage` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '',
`datetime` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `hourly_usage`;
");
return 2024012300;
}
};
?>
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 `hourly_usage` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'ID',
`date` date NOT NULL DEFAULT 0 COMMENT '',
`usage` longtext NOT NULL DEFAULT '{}' COMMENT '' CHECK (json_valid(`usage`)),
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `user_hourly_usage`;
");
return 2024012700;
}
public function down(): int
{
DB::getPdo()->exec("
CREATE TABLE IF NOT EXISTS `user_hourly_usage` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`user_id` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT 'ID',
`traffic` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '',
`hourly_usage` bigint(20) unsigned NOT NULL DEFAULT 0 COMMENT '',
`datetime` int(11) unsigned NOT NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `hourly_usage`;
");
return 2024012300;
}
};
Function Calls
None |
Stats
MD5 | 381a49e72df35bd70a3244f10d1258e9 |
Eval Count | 0 |
Decode Time | 83 ms |