Possible Duplicate:
What's the difference between is_null($var) and ($var === null)?
Is there any difference between following code:
if(is_null($x)) { ...
and
if($x===null) { ...
Possible Duplicate:
What's the difference between is_null($var) and ($var === null)?
Is there any difference between following code:
if(is_null($x)) { ...
and
if($x===null) { ...
Yes. == is a loose comparison, meaning a lot more than just NULL will result in true in the second version. See the type comparison tables.