You are exactly right John. Apparently PHP casts a string into the 0 value for an int. Try this code and see for yourself :
<?php
$t1=0;
$t2="comealskda;slkd";
$t2 = (int)$t2;
echo $t2;
if ($t2==$t1)
echo "true";
else
echo "false";
?>
$t2 can be any string. No matter what the value of t2 when cast manually to an int is zero. Interesting!!! 🙂