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); namespace Larastan\Larastan\Properties\Schema; use PhpMy..
Decoded Output download
<?php
declare(strict_types=1);
namespace Larastan\Larastan\Properties\Schema;
use PhpMyAdmin\SqlParser\Components\DataType;
final class PhpMyAdminDataTypeToPhpTypeConverter
{
public function convert(DataType $dataType): string
{
return match ($dataType->name) {
'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BINARY', 'VARBINARY', 'DATE', 'DATETIME', 'TIMESTAMP', 'TIME', 'TINYBLOB', 'BLOB', 'MEDIUMBLOB', 'JSON' => 'string',
'BIT', 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'YEAR' => 'int',
'DECIMAL', 'DEC', 'NUMERIC', 'FIXED', 'FLOAT', 'DOUBLE', 'DOUBLE PRECISION', 'REAL' => 'float',
'BOOL', 'BOOLEAN' => 'bool',
default => 'mixed',
};
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Larastan\Larastan\Properties\Schema;
use PhpMyAdmin\SqlParser\Components\DataType;
final class PhpMyAdminDataTypeToPhpTypeConverter
{
public function convert(DataType $dataType): string
{
return match ($dataType->name) {
'CHAR', 'VARCHAR', 'TINYTEXT', 'TEXT', 'MEDIUMTEXT', 'LONGTEXT', 'BINARY', 'VARBINARY', 'DATE', 'DATETIME', 'TIMESTAMP', 'TIME', 'TINYBLOB', 'BLOB', 'MEDIUMBLOB', 'JSON' => 'string',
'BIT', 'TINYINT', 'SMALLINT', 'MEDIUMINT', 'INT', 'INTEGER', 'BIGINT', 'YEAR' => 'int',
'DECIMAL', 'DEC', 'NUMERIC', 'FIXED', 'FLOAT', 'DOUBLE', 'DOUBLE PRECISION', 'REAL' => 'float',
'BOOL', 'BOOLEAN' => 'bool',
default => 'mixed',
};
}
}
Function Calls
None |
Stats
MD5 | b639c5baeb993cd518c33f0829f9a56a |
Eval Count | 0 |
Decode Time | 110 ms |