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) { if(is_array($token)) { echo token_name($token[0]) . EOL; } else { echo $token . EOL; } }
Output for 4.3.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_OPEN_TAGEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_VARIABLEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 9 =EOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_LNUMBEREOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 9 +EOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_LNUMBEREOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 9 ;EOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_ECHOEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_VARIABLEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_CLOSE_TAGEOL
Output for hhvm-3.10.0 - 3.12.0
Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_OPEN_TAGEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_VARIABLEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 9 =EOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_LNUMBEREOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 9 +EOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_LNUMBEREOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 9 ;EOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_ECHOEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_VARIABLEEOL Notice: Use of undefined constant EOL - assumed 'EOL' in /in/RG3SW on line 7 T_WHITESPACEEOLT_CLOSE_TAGEOL