4 ms·
Could someone please explain both the 2 + 0.3 and md5("PHP") + 1 thing?
by ma2rten 7y ago
Could someone please explain both the 2 + 0.3 and md5("PHP") + 1 thing?
- adimitrov 7y agoAutocasting. Autocasting was a cool and newbie friendly idea in principle. It just turned out to cause such horrible bugs in real code that no sane person would still argue its merits. It also leads to stupid notions of thruthiness (google Gary Bernhard's WAT talk) and bad junior dev behavior. I've seen a popularish PHP framework document the return value of a function al boolean, but the actual return value was the string "0". It wasn't even a by prduct of the implementation. They just explicitly used return "0" for no good reason.