Hacker News new | ask | show | jobs
by DJBunnies 10 days ago
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.

1 comments

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