$a='ten';
if($a == 0) {
echo 'equal 0';
} else {
echo 'not equal 0';
}
Now guess echo what?
yes ,of course echo 'equal 0 '
But why?
When use '==', the string $a will be change into a int ,and if $a is not started with char[_/d],it will be 0,so 0==0 is the truth.
We can use '===' to judge this .