Re: Proposal for a new array function

From: Date: Mon, 08 Feb 2016 17:36:13 +0000
Subject: Re: Proposal for a new array function
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-91125@lists.php.net to get a copy of this message
Hi, On 08.02.16 18:06, Cesar Rodas wrote: >>> return array_keys($arr) !== range(0, count($arr) - 1); > > array_keys($array) === range(0, count($array)-1) That approach would fall flat when the numeric keys are not consecutive: $array = [1=>"a", 3=>"b"]; Disclaimer: AFAIK complete goal of the function wasn't yet stated, thus this could be considered /acceptable/. cheers, - Markus

« previous php.internals (#91125) next »