4 ms·
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, u
by roflyear 4y 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.
- flir 4y agoPHP exists in a place where everything's a string (HTTPland). Type coercion makes more sense there.
- foobarbecue 4y agoOh 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.