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 Doctrine\Tests\Common\Lexer; use Doctrine\Comm..
Decoded Output download
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Common\Lexer;
use Doctrine\Common\Lexer\AbstractLexer;
use function in_array;
use function is_numeric;
/** @extends AbstractLexer<string, string|int> */
class ConcreteLexer extends AbstractLexer
{
final public const INT = 'int';
/**
* {@inheritDoc}
*/
protected function getCatchablePatterns(): array
{
return [
'=|<|>',
'[a-z]+',
'\d+',
];
}
/**
* {@inheritDoc}
*/
protected function getNonCatchablePatterns(): array
{
return [
'\s+',
'(.)',
];
}
protected function getType(string|int|float &$value): string
{
if (is_numeric($value)) {
$value = (int) $value;
return 'int';
}
if (in_array($value, ['=', '<', '>'])) {
return 'operator';
}
return 'string';
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
namespace Doctrine\Tests\Common\Lexer;
use Doctrine\Common\Lexer\AbstractLexer;
use function in_array;
use function is_numeric;
/** @extends AbstractLexer<string, string|int> */
class ConcreteLexer extends AbstractLexer
{
final public const INT = 'int';
/**
* {@inheritDoc}
*/
protected function getCatchablePatterns(): array
{
return [
'=|<|>',
'[a-z]+',
'\d+',
];
}
/**
* {@inheritDoc}
*/
protected function getNonCatchablePatterns(): array
{
return [
'\s+',
'(.)',
];
}
protected function getType(string|int|float &$value): string
{
if (is_numeric($value)) {
$value = (int) $value;
return 'int';
}
if (in_array($value, ['=', '<', '>'])) {
return 'operator';
}
return 'string';
}
}
Function Calls
None |
Stats
MD5 | 46ae85d6456e7a5ccdc8a32a2bd1f943 |
Eval Count | 0 |
Decode Time | 109 ms |