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); /** * This file is part of Hyperf. * * @link https:..
Decoded Output download
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Hyperf\Amqp\IO;
use Hyperf\Amqp\Exception\NotSupportedException;
use Hyperf\Amqp\Params;
use Hyperf\Engine\Constant;
use PhpAmqpLib\Wire\IO\AbstractIO;
class IOFactory implements IOFactoryInterface
{
public function create(array $config, Params $params): AbstractIO
{
$host = $config['host'] ?? 'localhost';
$port = $config['port'] ?? 5672;
$openSSL = $config['open_ssl'] ?? false;
return match (Constant::ENGINE) {
'Swoole' => new SwooleIO(
$host,
$port,
$params->getConnectionTimeout(),
$params->getReadWriteTimeout(),
$openSSL
),
'Swow' => new SwowIO(
$host,
$port,
$params->getConnectionTimeout(),
$params->getReadWriteTimeout()
),
default => throw new NotSupportedException()
};
}
}
?>
Did this file decode correctly?
Original Code
<?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact [email protected]
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Hyperf\Amqp\IO;
use Hyperf\Amqp\Exception\NotSupportedException;
use Hyperf\Amqp\Params;
use Hyperf\Engine\Constant;
use PhpAmqpLib\Wire\IO\AbstractIO;
class IOFactory implements IOFactoryInterface
{
public function create(array $config, Params $params): AbstractIO
{
$host = $config['host'] ?? 'localhost';
$port = $config['port'] ?? 5672;
$openSSL = $config['open_ssl'] ?? false;
return match (Constant::ENGINE) {
'Swoole' => new SwooleIO(
$host,
$port,
$params->getConnectionTimeout(),
$params->getReadWriteTimeout(),
$openSSL
),
'Swow' => new SwowIO(
$host,
$port,
$params->getConnectionTimeout(),
$params->getReadWriteTimeout()
),
default => throw new NotSupportedException()
};
}
}
Function Calls
None |
Stats
MD5 | b732f2468aa3aa6b9836d8bde8eb8b55 |
Eval Count | 0 |
Decode Time | 76 ms |