Weird php bug? : “” == 0
Posted by shadow_of__soul | Posted in Uncategorized | Posted on 18-01-2010
0
Hi,
just happened something weird, i have a sentence like this:
if($var!=”"){
}
the thing is that the var sometimes get the value of 0, and for some reason it returned false (something that never happened to me before in 3 years programming in php). anyway i understand that can be considered as normal, but i wondering if is a bug :s (why it don’t happened before )
the solution?
if($var!==”"){
}
i hope has been useful
Regards,
Shadow.




