In PHP, can someone explain to me why this resolves to true:
'NONE' == 0
Because any non-numerical string cast to int will turn into 0.
If you don't want that to happen, use ===, the identical operator.
Read:
http://php.net/manual/en/language.operators.comparison.php
http://php.net/manual/en/types.comparisons.php
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With