note 124371 deleted from function.array-splice by cmb
| From: | cmb@php.net | Date: | Wed, 06 Nov 2019 07:22:04 +0000 |
| Subject: | note 124371 deleted from function.array-splice by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212950@lists.php.net to get a copy of this message | ||
Note Submitter: jooorooo at gmail dot com
----
I'm using php 7.1 and "replacement" parameter is changet with $preserve_keys = false.
This is from documentation in php storm:
/**
* Extract a slice of the array
* @link https://php.net/manual/en/function.array-slice.php
* @param array $array <p>
* The input array.
* </p>
* @param int $offset <p>
* If offset is non-negative, the sequence will
* start at that offset in the array. If
* offset is negative, the sequence will
* start that far from the end of the array.
* </p>
* @param int $length [optional] <p>
* If length is given and is positive, then
* the sequence will have that many elements in it. If
* length is given and is negative then the
* sequence will stop that many elements from the end of the
* array. If it is omitted, then the sequence will have everything
* from offset up until the end of the
* array.
* </p>
* @param bool $preserve_keys [optional] <p>
* Note that array_slice will reorder and reset the
* array indices by default. You can change this behaviour by setting
* preserve_keys to true.
* </p>
* @return array the slice.
* @since 4.0
* @since 5.0
*/
function array_slice (array $array, $offset, $length = null, $preserve_keys = false) {}