note 95317 added to language.types.null
| From: | Anonymous at osu1 dot php dot net | Date: | Sun, 27 Dec 2009 02:56:54 +0000 |
| Subject: | note 95317 added to language.types.null | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-164342@lists.php.net to get a copy of this message | ||
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..."
----
Server IP: 208.69.120.55
Probable Submitter: 71.82.80.77
----
Manual Page -- http://www.php.net/manual/en/language.types.null.php
Edit -- https://master.php.net/note/edit/95317
Del: integrated -- https://master.php.net/note/delete/95317/integrated
Del: useless -- https://master.php.net/note/delete/95317/useless
Del: bad code -- https://master.php.net/note/delete/95317/bad+code
Del: spam -- https://master.php.net/note/delete/95317/spam
Del: non-english -- https://master.php.net/note/delete/95317/non-english
Del: in docs -- https://master.php.net/note/delete/95317/in+docs
Del: other reasons-- https://master.php.net/note/delete/95317
Reject -- https://master.php.net/note/reject/95317
Search -- https://master.php.net/manage/user-notes.php