Re: Re:[VOTE] array_key_first(), array_key_last(), array_value_first(),array_value_last()

From: Date: Tue, 10 Jul 2018 18:58:10 +0000
Subject: Re: Re:[VOTE] array_key_first(), array_key_last(), array_value_first(),array_value_last()
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-102726@lists.php.net to get a copy of this message
On Mon, Jul 9, 2018 at 6:31 PM CHU Zhaowei <me@jhdxr.com> wrote: > I don't think we have an agreement on dealing with non-existing value, and > the way this RFC proposed, just returning null without any notice/warning, > is wrong IMO. I know we already do this in other array_* functions, but we > cannot keep making mistakes just because we already made same mistake. > I voted no for the same reason. I'd even say that introducing a new array_ function that still accepts non arrays just to return null with a warning doesn't make sense at this point. With that said, I'd gladly vote yes if there would be a way to distinguish array_value_first([]) from array_value_first([0 => null]). Regards, Pedro

« previous php.internals (#102726) next »