Re:A look at modern PHP
by Supermancho on Tuesday May 05, 2020 @01:43PM
(#23082651)
Unit tests would have caught this, if you wrote them.
[ Parent
| on HN ]
Assuming you thought to test using a string that's all digits. You have to know about PHP's brokenness to even think to check that. In a sane language, it doesn't matter what the contents of the strings are, they're just strings.
>Unit tests would have caught this, if you wrote them.
If I hadn't considered string-number-keys in my code, I would also have forgotten about them in my unit tests. Maybe you're different.