abstract public slice ( integer $offset, integer | null $length = null, boolean $preserveKeys = false ) : |
||
$offset | integer | Slice begin index |
$length | integer | null | Length of the slice |
$preserveKeys | boolean | Whether array keys are preserved or no |
return | A new array, which is slice of the current array with specified $length |