3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = "//define('ID', '');" $tokens = token_get_all("<?php $string"); if ($tokens[1][0] == T_COMMENT) { echo 'comment'; } else { echo 'nope'; }
Output for 5.4.0 - 5.4.16
Parse error: syntax error, unexpected '$tokens' (T_VARIABLE) in /in/I4jBW on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.26
Parse error: syntax error, unexpected T_VARIABLE in /in/I4jBW on line 5
Process exited with code 255.