Hacker News new | ask | show | jobs
by roflyear 1168 days ago
I don't think "===" in PHP is the same as "is" in Python, though? Identity is important (why would you want to check for 0, None, "", etc.. in separate cases, unless you want to?) but I don't think that is what "===" in PHP.
2 comments

PHP exists in a place where everything's a string (HTTPland). Type coercion makes more sense there.
Oh you're right. I actually was thinking python "is" was written "===" because I got confused with javascript, yikes.

And I don't speak PHP.

Anyway yeah being able to compare identity and equivalence separately seems important.