// Loose comparison ==
0 == "foo" // true (before PHP 8: "foo" → 0)
0 == "" // true (before PHP 8)
"1" == "01" // true
100 == "1e2" // true
null == false // true
// PHP 8 fixed: non-numeric strings compare as strings
0 == "foo" // false in PHP 8+
Always use strict comparison === and !== — it checks both type and value. Enable declare(strict_types=1).
var_dump() shows type and value — indispensable when debugging type-related issues.