3v4l.org

run code in 300+ PHP versions simultaneously
<?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 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Fatal error: Uncaught Error: Undefined constant "EOL" in /in/RG3SW:7 Stack trace: #0 {main} thrown in /in/RG3SW on line 7
Process exited with code 255.
Output for 7.2.0 - 7.2.33, 7.3.12 - 7.3.33, 7.4.0 - 7.4.33
Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_OPEN_TAGEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_VARIABLEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 9 =EOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_LNUMBEREOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 9 +EOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_LNUMBEREOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 9 ;EOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_ECHOEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_VARIABLEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_WHITESPACEEOL Warning: Use of undefined constant EOL - assumed 'EOL' (this will throw an Error in a future version of PHP) in /in/RG3SW on line 7 T_CLOSE_TAGEOL
Output for 4.3.0 - 4.3.11, 4.4.0 - 4.4.9, 5.0.0 - 5.0.5, 5.1.0 - 5.1.6, 5.2.0 - 5.2.17, 5.3.0 - 5.3.29, 5.4.0 - 5.4.45, 5.5.0 - 5.5.38, 5.6.0 - 5.6.28, 7.0.0 - 7.0.20, 7.1.0 - 7.1.20
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

preferences:
243.75 ms | 408 KiB | 356 Q