3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $code = "<?php namespace Test; class TestClass { } "; $tokens = token_get_all($code); foreach ($tokens as $token) { echo token_name($token); }
based on Oa08k
Output for 7.0.0 - 7.2.0
Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, string given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, string given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, string given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be integer, array given in /in/gotCq on line 16
Output for 5.3.17 - 5.6.28
Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, string given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, string given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, string given in /in/gotCq on line 16 Warning: token_name() expects parameter 1 to be long, array given in /in/gotCq on line 16