Hacker News new | ask | show | jobs
by edudobay 1602 days ago
Though we cannot force PHP to interpret keys as strings if they also represent valid integers. I just had a case of an (associative) array of numeric codes — those which start with a '0' are treated as string keys, all others being treated as numeric. This doesn't matter so much at runtime, but I had to suppress some type checker (Psalm) errors.