PHP VERSION: 5.6.40

TEST PHP 8.1 [ array_is_list ]


1) array_is_list([]): [True]

2) array_is_list(['apple', 2, 3]): [True]

3) array_is_list([0 => 'apple', 'orange']): [True]

4) array_is_list([1 => 'apple', 'orange']) //The array does not start at 0 : [False]

5) array_is_list([0 => 'apple', 'foo' => 'bar']) // Non-integer keys : [False]

6) array_is_list([0 => 'apple', 2 => 'bar']) // Non-consecutive keys : [False]