3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $code = '<?php function blah($num) { if ($num) { return $num + 1; } return 0; } '; $tokens = token_get_all($code); foreach ($tokens as $token) { echo token_name($token) . "\n"; }
based on bXjVo
Output for 7.0.0 - 7.2.0
Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be integer, array given in /in/ooUS1 on line 15
Output for 4.3.0 - 5.6.21
Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, string given in /in/ooUS1 on line 15 Warning: token_name() expects parameter 1 to be long, array given in /in/ooUS1 on line 15