3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r(token_get_all('<?php phpinfo(); ?>'));
based on f232K
Output for 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => 379 [1] => <? [2] => 1 ) [1] => Array ( [0] => 319 [1] => php phpinfo [2] => 1 ) [2] => ( [3] => ) [4] => ; [5] => Array ( [0] => 382 [1] => [2] => 1 ) [6] => Array ( [0] => 381 [1] => ?> [2] => 1 ) )
Output for hhvm-3.10.0 - 3.12.0
Array ( [0] => Array ( [0] => 368 [1] => <?php [2] => 1 ) [1] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [2] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [3] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [4] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [5] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [6] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [7] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [8] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [9] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [10] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [11] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [12] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [13] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [14] => Array ( [0] => 394 [1] => <?php [2] => 1 ) [15] => Array ( [0] => 394 [1] => <?php [2] => 1 ) )
Output for 5.6.7 - 5.6.28
Array ( [0] => Array ( [0] => 376 [1] => <? [2] => 1 ) [1] => Array ( [0] => 310 [1] => php phpinfo [2] => 1 ) [2] => ( [3] => ) [4] => ; [5] => Array ( [0] => 379 [1] => [2] => 1 ) [6] => Array ( [0] => 378 [1] => ?> [2] => 1 ) )
Output for 5.5.24 - 5.5.35
Array ( [0] => Array ( [0] => 374 [1] => <? [2] => 1 ) [1] => Array ( [0] => 308 [1] => php phpinfo [2] => 1 ) [2] => ( [3] => ) [4] => ; [5] => Array ( [0] => 377 [1] => [2] => 1 ) [6] => Array ( [0] => 376 [1] => ?> [2] => 1 ) )
Output for 5.4.34 - 5.4.45
Array ( [0] => Array ( [0] => 372 [1] => <? [2] => 1 ) [1] => Array ( [0] => 307 [1] => php phpinfo [2] => 1 ) [2] => ( [3] => ) [4] => ; [5] => Array ( [0] => 375 [1] => [2] => 1 ) [6] => Array ( [0] => 374 [1] => ?> [2] => 1 ) )
Output for 5.3.0 - 5.4.32
Array ( [0] => Array ( [0] => 311 [1] => <?php phpinfo(); ?> [2] => 1 ) )
Output for 5.2.2 - 5.2.17
Array ( [0] => Array ( [0] => 311 [1] => <? [2] => 1 ) [1] => Array ( [0] => 311 [1] => php phpinfo(); ?> [2] => 1 ) )
Output for 5.1.0 - 5.2.1
Array ( [0] => Array ( [0] => 311 [1] => <? ) [1] => Array ( [0] => 311 [1] => php phpinfo(); ?> ) )
Output for 5.0.0 - 5.0.5
Array ( [0] => Array ( [0] => 310 [1] => <? ) [1] => Array ( [0] => 310 [1] => php phpinfo(); ?> ) )
Output for 4.4.2 - 4.4.9
Array ( [0] => Array ( [0] => 309 [1] => <? ) [1] => Array ( [0] => 309 [1] => php phpinfo(); ?> ) )
Output for 4.3.0 - 4.4.1
Array ( [0] => Array ( [0] => 308 [1] => <? ) [1] => Array ( [0] => 308 [1] => php phpinfo(); ?> ) )