PHP - compare two diffrent type variable bug or issue
There is two different type of variables. but while comparing both
variable using == operator it returns weired output. Is this bug or some
other issue? I am surprised. Here is code,
$a=1000;
$b='1000square';
if($a==$b){
echo "a equal b";
}else{
echo "a not equal b";
}
It outputs : a equal b. But expected : a not equal b.
Can anyone explain?
Thanks!!!
No comments:
Post a Comment