4 ms·
> I can’t count how many times this conflation wasted my time and introduced various bugs Could you give examples of this? I'm of the opinion PHP could use mor
by FriedrichN 6y ago
> I can’t count how many times this conflation wasted my time and introduced various bugs
Could you give examples of this? I'm of the opinion PHP could use more strictly typed arrays/lists, but I haven't run into any issues with PHP arrays myself.
- Shish2k 6y agoThe one that annoyed me recently - numeric-looking string keys are turned into numeric keys. So if you have eg a hashmap of [naughty_word => replacement], then [“penis”=>”willy”] and [“asshole”=>”bottom”] work fine, but [“69”=>”cuddle”] crashes your program with an "unexpected integer” exception.
- FriedrichN 6y agoWhen using strict typing that is indeed a problem. Thanks for the example. edit: itchy trigger finger