3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $movie = array( "4587" => "Rear Window", "7895" => "Alfred Hitchcock", "12450" => 1954, "1111" => 112 ); // Displays "Array ( [director] => Alfred Hitchcock [year] => 1954 )" var_dump( array_slice( $movie, 1, 2, true ) );
based on cE3SQ
Output for 5.0.2 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
array(2) { [7895]=> string(16) "Alfred Hitchcock" [12450]=> int(1954) }
Output for 4.3.0 - 5.0.1
Warning: Wrong parameter count for array_slice() in /in/3cRNS on line 9 NULL