Email or username:

Password:

Forgot your password?
Top-level
nex

@woozle PHP devs aren't (merely) incompetent people who are unaware of certain things. Rather, they deliberately insist on not even trying to get anything right. This attitude is a precondition for working on PHP at all.

> But comparing two strings makes them into numbers?

[Edited to remove a part I'd gotten plain wrong; PHP isn't ‘stringly typed’.] Lots of languages are like this; it's a valid design decision. Though it's certainly possible to implement that better than PHP does.

2 comments
wizzwizz4

@nex @woozle That's not true. In PHP, `"1" !== 1`.

nex

@wizzwizz4 Technically, `"1" !== 1` does not demonstrate that `"1"` and `1` are different types ;)

But you're right, they're supposed to be different types in PHP and my explanation is just wrong; editing it now. Thanks for pointing this out!

Go Up