public static function is_list($array)
{
if (!is_array($array)) {
return false;
}
// Keys of the array
$keys = array_keys($array);
// If the array keys of the keys match the keys, then the array must
// not be associative (e.g. the keys array looked like {0:0, 1:1...}).
return array_keys($keys) === $keys;
}