3v4l.org

run code in 150+ 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 - 5.6.28, 7.0.0 - 7.1.0
array(2) { ["a"]=> int(7) ["b"]=> int(1) }
Output for hhvm-3.10.0 - 3.12.0
array(2) { ["argv"]=> array(1) { [0]=> string(9) "/in/4lIVf" } ["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) }