note 95317 deleted from language.types.null by danbrown
| From: | danbrown@php.net | Date: | Sun, 27 Dec 2009 03:13:09 +0000 |
| Subject: | note 95317 deleted from language.types.null by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-164344@lists.php.net to get a copy of this message | ||
Note Submitter: Anonymous
Reason: spam
----
Hi,
Is there something about NULL I don't understand here...why can a variable test as equal to
NULL, but simultaneously isn't NULL according to is_null and is_set?
$test="";
if ($test==NULL)
{
echo "NULL...";
}
else
{
echo "Not NULL...";
}
//echoes "NULL..."
if (is_null($test))
{
echo "NULL...";
}
else
{
echo "Not NULL...";
}
//echoes "Not NULL..."
if (!isset($test))
{
echo "NULL...";
}
else
{
echo "Not NULL...";
}
//echoes "Not NULL..."