|
|
|
|
|
by Navarr
1591 days ago
|
|
I love PHP "arrays" but there is one tiny gotcha that becomes more important as we do type-safety stuff more and more. `$a['1'] = 'string';` becomes `$a[1] = 'string';`. This appears to be the case for any fully-fledged decimal number where `(string)(int)$key === $key` So if you are expecting `array_keys` to return all strings, you might get surprised |
|