Timeline for Why PHP casts two numerical strings to numbers before [loosely] comparing them?
Current License: CC BY-SA 3.0
Post Revisions
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 21, 2025 at 18:08 | comment | added | hakre | X-Ref: A somewhat related classic: Nikic's answer to Type-juggling and (strict) greater/lesser-than comparisons in PHP | |
| Jun 4, 2013 at 9:49 | vote | accept | Your Common Sense | ||
| Jun 2, 2013 at 6:23 | comment | added | cHao |
Cause they didn't take a hint from Perl. :P It would have been so much easier to say like "== compares numerically, eq compares lexically, and === compares strictly". (Though if we had the first two, the latter might never need to be used. Eh, maybe with objects.)
|
|
| Jun 2, 2013 at 6:22 | answer | added | Your Common Sense | timeline score: 5 | |
| Jun 2, 2013 at 6:16 | answer | added | Amir | timeline score: 5 | |
| Jun 2, 2013 at 5:20 | history | edited | Your Common Sense | CC BY-SA 3.0 |
edited title
|
| Jun 2, 2013 at 5:13 | answer | added | Orangepill | timeline score: 7 | |
| Jun 2, 2013 at 5:09 | history | asked | Your Common Sense | CC BY-SA 3.0 |