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\ConfigZookeeper;

use Hyperf\Contract\ConfigInterface;
use Swoole\Zookeeper;

class Client implements ClientInterface
{
    public function __construct(private ConfigInterface $config)
    {
    }

    public function pull(): array
    {
        $zk = new Zookeeper($this->config->get('config_center.drivers.zookeeper.server'), 2.5);
        $path = $this->config->get('config_center.drivers.zookeeper.path', '/conf');
        $config = $zk->get($path);
        return json_decode($config, true);
    }
}
 ?>

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\ConfigZookeeper;

use Hyperf\Contract\ConfigInterface;
use Swoole\Zookeeper;

class Client implements ClientInterface
{
    public function __construct(private ConfigInterface $config)
    {
    }

    public function pull(): array
    {
        $zk = new Zookeeper($this->config->get('config_center.drivers.zookeeper.server'), 2.5);
        $path = $this->config->get('config_center.drivers.zookeeper.path', '/conf');
        $config = $zk->get($path);
        return json_decode($config, true);
    }
}

Function Calls

None

Variables

None

Stats

MD5 cf0d9c6eb8b2772bbf42ee8e27c1e7a3
Eval Count 0
Decode Time 69 ms