3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $string = 'public function enum($value, ...$items) {}'; $tokens = token_get_all($string); print_r($tokens);
Output for 7.0.0 - 7.1.0
Array ( [0] => Array ( [0] => 321 [1] => public function enum($value, ...$items) {} [2] => 1 ) )
Output for 5.2.2 - 5.4.45, hhvm-3.12.0
Array ( [0] => Array ( [0] => 311 [1] => public function enum($value, ...$items) {} [2] => 1 ) )
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.7 - 5.6.28
Array ( [0] => Array ( [0] => 314 [1] => public function enum($value, ...$items) {} [2] => 1 ) )
Output for 5.5.24 - 5.5.35
Array ( [0] => Array ( [0] => 312 [1] => public function enum($value, ...$items) {} [2] => 1 ) )
Output for 5.1.0 - 5.2.1
Array ( [0] => Array ( [0] => 311 [1] => public function enum($value, ...$items) {} ) )
Output for 5.0.0 - 5.0.5
Array ( [0] => Array ( [0] => 310 [1] => public function enum($value, ...$items) {} ) )
Output for 4.4.2 - 4.4.9
Array ( [0] => Array ( [0] => 309 [1] => public function enum($value, ...$items) {} ) )
Output for 4.3.0 - 4.4.1
Array ( [0] => Array ( [0] => 308 [1] => public function enum($value, ...$items) {} ) )