3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(token_get_all('<?php true')); //echo token_name(311);
based on YsIGi
Output for 7.0.0 - 7.1.0
array(2) { [0]=> array(3) { [0]=> int(379) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(319) [1]=> string(4) "true" [2]=> int(1) } }
Output for 5.3.0 - 5.3.29, hhvm-3.10.0 - 3.12.0
array(2) { [0]=> array(3) { [0]=> int(368) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(307) [1]=> string(4) "true" [2]=> int(1) } }
Output for 5.6.8 - 5.6.28
array(2) { [0]=> array(3) { [0]=> int(376) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(310) [1]=> string(4) "true" [2]=> int(1) } }
Output for 5.5.24 - 5.5.35
array(2) { [0]=> array(3) { [0]=> int(374) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(308) [1]=> string(4) "true" [2]=> int(1) } }
Output for 5.4.0 - 5.4.45
array(2) { [0]=> array(3) { [0]=> int(372) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(307) [1]=> string(4) "true" [2]=> int(1) } }
Output for 5.2.2 - 5.2.17
array(2) { [0]=> array(3) { [0]=> int(367) [1]=> string(6) "<?php " [2]=> int(1) } [1]=> array(3) { [0]=> int(307) [1]=> string(4) "true" [2]=> int(1) } }
Output for 5.1.1 - 5.2.1
array(2) { [0]=> array(2) { [0]=> int(367) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(307) [1]=> string(4) "true" } }
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/aumGW on line 4
Process exited with code 255.
Output for 5.0.0 - 5.0.5
array(2) { [0]=> array(2) { [0]=> int(365) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(306) [1]=> string(4) "true" } }
Output for 4.4.2 - 4.4.9
array(2) { [0]=> array(2) { [0]=> int(354) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(305) [1]=> string(4) "true" } }
Output for 4.3.0 - 4.4.1
array(2) { [0]=> array(2) { [0]=> int(353) [1]=> string(6) "<?php " } [1]=> array(2) { [0]=> int(304) [1]=> string(4) "true" } }