array_is_list


array_is_list ( $arr )

Parameters:
  • (array) arr The array being evaluated.
See:
Returns:
  • (bool) True if array is a list, false otherwise.
Defined at:

Description

Polyfill for `array_is_list()` function added in PHP 8.1.Determines if the given array is a list. An array is considered a list if its keys consist of consecutive numbers from 0 to count($array)-1.

Related Functions

array_key_last, array_key_first, _wp_array_set, wp_parse_id_list, wp_parse_list

Top Google Results

User discussions

wpseek mobile