difference between $foo and isset($foo)
| From: | Norman Zhang | Date: | Thu, 18 Apr 2002 18:47:17 +0000 |
| Subject: | difference between $foo and isset($foo) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93579@lists.php.net to get a copy of this message | ||
Hi,
I am looking at some codes. Some authors use $foo and isset($foo)
interchangeably. Just to want to make sure that the statement,
if ($foo) { ... }
is different from
if (isset($foo)) { ... }
Right? if ($foo) means variable exists and can be null. Whereas, isset($foo)
means that the value in $foo cannot be null?
Regards,
Norman