3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input_array = array('a' => 'a', 'b' => 'b', 'c' => 'c', 'd' => 'd', 'e' => 'e'); print_r(array_slice($input_array, 0, 2, true)); print_r(array_slice($input_array, 0, 2));

preferences:
38.91 ms | 402 KiB | 5 Q