News for hackers. Stuff that matters.
Re:An Internet of PHP by chx on Saturday September 09, 2023 @01:33PM (#37447868)
Arguably 48 == "48" should be true. If this doesn't work for you, stick to ===.
Re:An Internet of PHP by xigoi on Saturday September 09, 2023 @01:37PM (#37447927)
Thank you, I'll stick to languages where you can't just compare numbers and strings without an explicit conversion.

Also, should 48 == "48.0" be true? How about "048", "48.", "0x30", " 48 ", "48foo", "3*16", "XLVIII", "forty-eight"?

Re:An Internet of PHP by chx on Sunday September 10, 2023 @06:41AM (#37454605)
Once again: just use ===

If you decide languages based on minutiae like this, I can only pity you.

Re:An Internet of PHP by xigoi on Sunday September 10, 2023 @06:43AM (#37454619)
=== works for equality (if you actually remember to use it), but how about comparison? There's no strict version of <.
Re:An Internet of PHP by chx on Sunday September 10, 2023 @11:39AM (#37456869)
strcmp