Re: [RFC] [Discussion] array_first() and array_last()

From: Date: Sat, 05 Apr 2025 18:04:24 +0000
Subject: Re: [RFC] [Discussion] array_first() and array_last()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-127049@lists.php.net to get a copy of this message
On 05/04/2025 20:00, Claude Pache wrote: > Hi Niels, > > It is reasonable. I have a userland implementation of that in my codebase since long ago. > > You missed the following point when discussing the behaviour for empty array: > > * Consistent with array_shift() and > array_pop(), which are also about retrieving the first, respectively > the last element of an array. Hi Claude Good point, I'll add that as well, thanks. There are probably even more arguments that can be made :) > > —Claude Niels

« previous php.internals (#127049) next »