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\Cache\Collector;

class FileStorage
{
    protected ?int $expiredTime = null;

    public function __construct(protected mixed $data, $ttl)
    {
        if (is_numeric($ttl) && $ttl > 0) {
            $this->expiredTime = time() + $ttl;
        }
    }

    public function getData()
    {
        return $this->data;
    }

    public function isExpired(): bool
    {
        if (is_null($this->expiredTime)) {
            return false;
        }

        return time() > $this->expiredTime;
    }
}
 ?>

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\Cache\Collector;

class FileStorage
{
    protected ?int $expiredTime = null;

    public function __construct(protected mixed $data, $ttl)
    {
        if (is_numeric($ttl) && $ttl > 0) {
            $this->expiredTime = time() + $ttl;
        }
    }

    public function getData()
    {
        return $this->data;
    }

    public function isExpired(): bool
    {
        if (is_null($this->expiredTime)) {
            return false;
        }

        return time() > $this->expiredTime;
    }
}

Function Calls

None

Variables

None

Stats

MD5 4f5731439be82648daa77aa0d08a78cd
Eval Count 0
Decode Time 88 ms