3v4l.org

run code in 300+ PHP versions simultaneously
<?php $input = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5); print_r(array_slice($input, -1, 1));

preferences:
37.28 ms | 402 KiB | 5 Q