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 namespace Phug\Parser\TokenHandler; use Phug\Lexer\Token\VariableToken; use Phug\L..

Decoded Output download

<?php

namespace Phug\Parser\TokenHandler;

use Phug\Lexer\Token\VariableToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\VariableNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;

class VariableTokenHandler implements TokenHandlerInterface
{
    public function handleToken(TokenInterface $token, State $state)
    {
        if (!($token instanceof VariableToken)) {
            throw new \RuntimeException(
                'You can only pass variable tokens to this token handler'
            );
        }

        /** @var VariableNode $node */
        $node = $state->createNode(VariableNode::class, $token);
        $node->setName($token->getName());
        $state->setCurrentNode($node);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Phug\Parser\TokenHandler;

use Phug\Lexer\Token\VariableToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\VariableNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;

class VariableTokenHandler implements TokenHandlerInterface
{
    public function handleToken(TokenInterface $token, State $state)
    {
        if (!($token instanceof VariableToken)) {
            throw new \RuntimeException(
                'You can only pass variable tokens to this token handler'
            );
        }

        /** @var VariableNode $node */
        $node = $state->createNode(VariableNode::class, $token);
        $node->setName($token->getName());
        $state->setCurrentNode($node);
    }
}

Function Calls

None

Variables

None

Stats

MD5 a34585c9c97ddde508789ade940defde
Eval Count 0
Decode Time 74 ms