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 4.4.2 - 4.4.9, 5.1.2 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
comment
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.1.1
nope
Output for 5.1.0

Process exited with code 137.
Output for 4.3.0 - 4.4.1, 5.0.0 - 5.0.5
Notice: Undefined offset: 1 in /in/GbiI4 on line 7 nope