14 Oct
2005
14 Oct
'05
2:20 p.m.
It is well known that these are not the same.
These are GREAT charts. Duly bookmarked.
We have already found that is_null is slower but equals to === NULL so use the latter. In the table referenced above !isset always equals to is_null, so I propose to use !isset when we want to check for, well, not being set.
if ($foo) and if (isset($foo)) is not the same, often it's a shorthand for if(isset($foo) && $foo != 0). I think if(isset($foo) && $foo) will always do. Sometimes isset() can be ommited because we know $foo is set.
Regards
NK
-- Dondley Communications http://www.dondleycommunications.com Communicate or Die: American Labor Unions and the Internet http://www.communicateordie.com