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\WhileToken; use Phug\Lexe..

Decoded Output download

<?php

namespace Phug\Parser\TokenHandler;

use Phug\Lexer\Token\WhileToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\WhileNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;

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

        /** @var WhileNode $node */
        $node = $state->createNode(WhileNode::class, $token);
        $node->setSubject($token->getSubject());
        $state->setCurrentNode($node);
    }
}
 ?>

Did this file decode correctly?

Original Code

<?php

namespace Phug\Parser\TokenHandler;

use Phug\Lexer\Token\WhileToken;
use Phug\Lexer\TokenInterface;
use Phug\Parser\Node\WhileNode;
use Phug\Parser\State;
use Phug\Parser\TokenHandlerInterface;

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

        /** @var WhileNode $node */
        $node = $state->createNode(WhileNode::class, $token);
        $node->setSubject($token->getSubject());
        $state->setCurrentNode($node);
    }
}

Function Calls

None

Variables

None

Stats

MD5 f33f841cb0dc06149d045a7082753d5b
Eval Count 0
Decode Time 95 ms