On 30/10/2016 23:10, Fleshgrinder wrote:
/** Get and remove the first element from the array. */
function array_take_first(array $array);
/** Get and remove the last element from the array. */
function array_take_last(array $array);
These two already exist; they're called array_shift() and array_pop().
The need for new functions for array_first() and array_last() is
precisely for when you *don't* want to modify the array.
Regards,
--
Rowan Collins
[IMSoP]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php