[drupal-devel] PHP 101: isset() does not check for zero
sdondley at gmail.com
Fri Oct 14 12:20:05 UTC 2005
> 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.
Communicate or Die: American Labor Unions and the Internet
More information about the drupal-devel