Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

--TEST-- PhpToken implements __toString() --EXTENSIONS-- tokenizer --FILE-- <?php $tokens..

Decoded Output download

--TEST--
PhpToken implements __toString()
--EXTENSIONS--
tokenizer
--FILE--
<?php

$tokens = PhpToken::tokenize('<?php echo "Hello ". $what;');
var_dump(implode($tokens));

var_dump($tokens[0] instanceof Stringable);
var_dump((string) $tokens[0]);
var_dump($tokens[0]->__toString());

?>
--EXPECT--
string(27) "<?php echo "Hello ". $what;"
bool(true)
string(6) "<?php "
string(6) "<?php "
 ?>

Did this file decode correctly?

Original Code

--TEST--
PhpToken implements __toString()
--EXTENSIONS--
tokenizer
--FILE--
<?php

$tokens = PhpToken::tokenize('<?php echo "Hello ". $what;');
var_dump(implode($tokens));

var_dump($tokens[0] instanceof Stringable);
var_dump((string) $tokens[0]);
var_dump($tokens[0]->__toString());

?>
--EXPECT--
string(27) "<?php echo "Hello ". $what;"
bool(true)
string(6) "<?php "
string(6) "<?php "

Function Calls

None

Variables

None

Stats

MD5 6776f05ca6f886f0d870bea03acc6ed0
Eval Count 0
Decode Time 100 ms