Conditions | 1 |
Paths | 1 |
Total Lines | 9 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
7 | public static function isAssoc(array $array) |
||
8 | { |
||
9 | // Keys of the array |
||
10 | $keys = array_keys($array); |
||
11 | |||
12 | // If the array keys of the keys match the keys, then the array must |
||
13 | // not be associative (e.g. the keys array looked like {0:0, 1:1...}). |
||
14 | return array_keys($keys) !== $keys; |
||
15 | } |
||
16 | |||
38 |