3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $code = '<?php "${/*}";'; $tokens = token_get_all($code); foreach ($tokens as $token) { if (is_array($token)) { echo (token_name($token[0]) . ': ' . $token[1] . ' <br /> '); } else { echo ('' . $token . ' <br /> '); } }
Output for 5.2.10 - 5.6.28, 7.0.0 - 7.1.0
Warning: Unterminated comment starting line 1 in /in/vMK51 on line 5 T_OPEN_TAG: <?php <br /> " <br /> T_DOLLAR_OPEN_CURLY_BRACES: ${ <br /> T_COMMENT: /*}"; <br />
Output for hhvm-3.10.0 - 3.12.0
T_OPEN_TAG: <?php <br /> " <br /> T_DOLLAR_OPEN_CURLY_BRACES: ${ <br />
Output for 5.2.3 - 5.2.9
Warning: Unterminated comment starting line 1 in /in/vMK51 on line 5 T_OPEN_TAG: <?php <br /> " <br /> T_DOLLAR_OPEN_CURLY_BRACES: ${ <br />
Output for 4.3.0 - 5.2.2
<br /> <b>Warning</b>: Unterminated comment starting line 1 in <b>/in/vMK51</b> on line <b>5</b><br /> T_OPEN_TAG: <?php <br /> " <br /> T_DOLLAR_OPEN_CURLY_BRACES: ${ <br />