Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
DJBunnies
· 5mo ago · 0 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.
Comments
[–]
usernametaken29
5mo ago
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