r/ProgrammerHumor • • Sep 25 '26

Meme iHatedItUntilITriedIt

Post image
10k Upvotes

540 comments sorted by

View all comments

Show parent comment

1

u/stormalize Sep 25 '26

Same with strict comparison in PHP

Maybe I''m misunderstanding the point you are trying to make but $userId == false is not strict though. If you instead do $userId === false and userId is 0, it will give you false. In PHP I default to strict unless there is a really good reason to not use it.

1

u/Crimento Sep 25 '26

My point was that I had no idea about strict comparisons back then and how important they are in dynamic typed languages

1

u/stormalize Sep 26 '26

Ahh got it, I just read it wrong. Totally agree!