<?php $tokens = token_get_all(" <?php class Foo { function __halt_compiler(){} } (new Foo())->__halt_compiler(); not_html(); " ); array_walk($tokens, function($tk) { if(is_array($tk)) { if(($t = token_name($tk[0])) == 'T_WHITESPACE') return; echo "L{$tk[2]}: ".$t." {$tk[1]}", PHP_EOL; } else echo $tk, PHP_EOL; });
You have javascript disabled. You will not be able to edit any code.