Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public static function isAssoc(array $array) |
||
17 | { |
||
18 | // Keys of the array |
||
19 | $keys = array_keys($array); |
||
20 | |||
21 | // If the array keys of the keys match the keys, then the array must |
||
22 | // not be associative (e.g. the keys array looked like {0:0, 1:1...}). |
||
23 | return array_keys($keys) !== $keys; |
||
24 | } |
||
25 | |||
48 |