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 /** * This file is part of the Zephir. * * (c) Phalcon Team <[email protected]..
Decoded Output download
<?php
/**
* This file is part of the Zephir.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Zephir\Parser;
use function sprintf;
use function version_compare;
class Manager
{
public const MINIMUM_PARSER_VERSION = '1.5.0';
public const PARSER_HOME_PAGE = 'https://github.com/zephir-lang/php-zephir-parser';
public function __construct(protected Parser $parser)
{
}
public function getParser(): Parser
{
return $this->parser;
}
/**
* Check if Zephir Parser available.
*
* @return bool
*/
public function isAvailable(): bool
{
return $this->parser->isAvailable()
&& version_compare(self::MINIMUM_PARSER_VERSION, $this->parser->getVersion(), '<=');
}
public function requirements(): string
{
$template = <<<EOF
The Zephir Parser extension %s.
Note: Zephir no longer distributed with internal parser.
%s
To install latest stable Zephir Parser please refer to:
%s
EOF;
if ($this->parser->isAvailable()) {
$add = sprintf("Minimum required Zephir Parser version: %s
", self::MINIMUM_PARSER_VERSION);
} else {
$add = '';
}
return sprintf(
$template,
$this->parser->isAvailable() ? 'is outdated' : 'is not loaded',
$add,
self::PARSER_HOME_PAGE
);
}
}
?>
Did this file decode correctly?
Original Code
<?php
/**
* This file is part of the Zephir.
*
* (c) Phalcon Team <[email protected]>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Zephir\Parser;
use function sprintf;
use function version_compare;
class Manager
{
public const MINIMUM_PARSER_VERSION = '1.5.0';
public const PARSER_HOME_PAGE = 'https://github.com/zephir-lang/php-zephir-parser';
public function __construct(protected Parser $parser)
{
}
public function getParser(): Parser
{
return $this->parser;
}
/**
* Check if Zephir Parser available.
*
* @return bool
*/
public function isAvailable(): bool
{
return $this->parser->isAvailable()
&& version_compare(self::MINIMUM_PARSER_VERSION, $this->parser->getVersion(), '<=');
}
public function requirements(): string
{
$template = <<<EOF
The Zephir Parser extension %s.
Note: Zephir no longer distributed with internal parser.
%s
To install latest stable Zephir Parser please refer to:
%s
EOF;
if ($this->parser->isAvailable()) {
$add = sprintf("Minimum required Zephir Parser version: %s\n", self::MINIMUM_PARSER_VERSION);
} else {
$add = '';
}
return sprintf(
$template,
$this->parser->isAvailable() ? 'is outdated' : 'is not loaded',
$add,
self::PARSER_HOME_PAGE
);
}
}
Function Calls
None |
Stats
MD5 | d3007b328b8fb8b806ed35ea63c13510 |
Eval Count | 0 |
Decode Time | 104 ms |