3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump(array_slice(array('a' => 1, 'b' => 2, 'c' => 3, 'd' => 4), 2, null, true));
based on cIpp5
Output for 5.2.4 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { ["c"]=> int(3) ["d"]=> int(4) }
Output for 5.0.2 - 5.2.3
array(0) { }
Output for 4.3.0 - 5.0.1
Warning: Wrong parameter count for array_slice() in /in/UXpv8 on line 3 NULL