3 ms·
Pretty much any language that evaluates this as true: "null" == null
by colejohnson66 10y ago
Pretty much any language that evaluates this as true:
"null" == null
- deleted 10y ago[deleted]
- eeZi 10y agoPython doesn't, and any language that evaluates this as true is crazy. Not even JavaScript does this.
- eyelidlessness 10y agoNot even PHP (it took me about 10 minutes to remember how to PHP before I could test it to be sure).
- ht85 10y agoWhat's the difference between yourself and a Wordpress plugin? None, doing things in PHP makes you really insecure.
- deathanatos 10y agoIt is — sort of — in both. It happens by programmers who are getting superstitious about what the actual type of a variable they have is, and `str()` it. Then they "know" what they're working with. (Alas, the string "None" or "null".)
- city41 10y agoThe only time I can think of that happening is poorly written SQL queries built out of concatenating strings. And if a system is doing that it has far bigger problems than the last name "Null"
- deleted 10y ago[deleted]
- WalterBright 10y agoNot C, C++, or D.
- ec109685 10y agoThis is silly. Not even this is true in many languages null == null
- BillinghamJ 10y agoBased on the replies you've received, I'd say that actually there is a very small minority list of languages which do this.