On Mon, Feb 8, 2016 at 09:32 AM, Matthew Setter wrote:
The approach I took was this: return array_keys($arr) !== range(0, count($arr) - 1);
FWIW, this might not work for arrays with missing indices like [0 => 'a', 2 => 'b']
I personally would appreciate a function like you proposed. --Christian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php