Skip to content

Comment on Learn PHP in 2026 (Yes, Really)parent

Comments

You're thinking of == which type coerces the non-empty string to boolean true.

PHP is not the only language that has this type of behavior.

It’s not the only language but it’s notorious for having the worst equality operator to the point where you are not even supposed to use == because it’s that awful

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.