3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [0,1,2,3,4,5]; $b = array_slice($a, 0, 3); var_dump($b);
Output for 5.5.0 - 7.2.6
array(3) { [0]=> int(0) [1]=> int(1) [2]=> int(2) }