Strings can look like 0 to the == operator and you can get into uncalled for hithces if you swap the string and numeric operators:
$apples = "apples";
$oranges = "oranges";
if($apples == $oranges){
print "$apples and $oranges are the same";
}else {
print "$apples and $oranges are not the same";
}