3v4l.org

run code in 300+ PHP versions simultaneously
<?php $tokens = token_get_all('<?php $a = 1 + 2; echo $a ?>'); var_dump($tokens) foreach($tokens as $token) { echo token_name($token[0]); }
Output for 5.4.0 - 5.4.13
Parse error: syntax error, unexpected 'foreach' (T_FOREACH) in /in/RWsLg on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.23
Parse error: syntax error, unexpected T_FOREACH in /in/RWsLg on line 5
Process exited with code 255.

preferences:
187.29 ms | 1395 KiB | 45 Q