3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = range(1, 10); $testated = array_slice($array, 6, -4); $removed = array_splice($array, 6, -4, array(42)); var_dump($removed, $testated, $removed === $testated, $array);

preferences:
37.54 ms | 402 KiB | 5 Q