3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $x = ['a', 'b', 'c']; var_dump(array_slice($x, 0, 2));
based on J2ceO
Output for 5.6.0 - 5.6.30, hhvm-3.15.4, 7.0.0 - 7.3.0beta1
array(2) { [0]=> string(1) "a" [1]=> string(1) "b" }