3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $test = array(0 => 'test'); unset($test[0]); $test2 = array_slice($test, 0, 2, true); var_dump($test); var_dump($test2);
Output for 5.0.2 - 7.1.0
array(0) { } array(0) { }
Output for 4.3.0 - 5.0.1
Warning: Wrong parameter count for array_slice() in /in/4qooQ on line 6 array(0) { } NULL