3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = count(get_defined_vars()); $b = 1; $c = get_defined_vars(); var_dump(array_slice($c, $a));
Output for 5.4.0 - 7.1.7
array(2) { ["a"]=> int(7) ["b"]=> int(1) }
Output for 5.0.0 - 5.3.29
array(2) { ["a"]=> int(16) ["b"]=> int(1) }
Output for 4.3.2 - 4.4.9
array(2) { ["a"]=> int(15) ["b"]=> int(1) }
Output for 4.3.0 - 4.3.1
array(2) { ["a"]=> int(13) ["b"]=> int(1) }