Selects a sequence of elements using the same rules as
array_slice(), but instead of being
returned, those elements are either removed or, if the fourth argument
is provided, replaced with that array. An array containing the removed
(or replaced) elements is returned.