3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $tokens = token_get_all('<?php $a = 1 + 2; echo $a ?>'); foreach($tokens as $token) { echo token_name($token[0]); }
Output for hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
T_OPEN_TAGT_VARIABLET_WHITESPACE Warning: token_name() expects parameter 1 to be integer, string given in /in/09WGf on line 6 T_WHITESPACET_LNUMBERT_WHITESPACE Warning: token_name() expects parameter 1 to be integer, string given in /in/09WGf on line 6 T_WHITESPACET_LNUMBER Warning: token_name() expects parameter 1 to be integer, string given in /in/09WGf on line 6 T_WHITESPACET_ECHOT_WHITESPACET_VARIABLET_WHITESPACET_CLOSE_TAG
Output for 4.3.0 - 5.6.28
T_OPEN_TAGT_VARIABLET_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/09WGf on line 6 T_WHITESPACET_LNUMBERT_WHITESPACE Warning: token_name() expects parameter 1 to be long, string given in /in/09WGf on line 6 T_WHITESPACET_LNUMBER Warning: token_name() expects parameter 1 to be long, string given in /in/09WGf on line 6 T_WHITESPACET_ECHOT_WHITESPACET_VARIABLET_WHITESPACET_CLOSE_TAG