Korte versie: if ("$myVal" === '0') of if (strval($myVal) === '0') Lange versie: if ($myVal === 0 || $myVal === '0')