note 129060 added to function.isset
| From: | senchv at gmail dot com | Date: | Wed, 22 Nov 2023 14:17:14 +0000 |
| Subject: | note 129060 added to function.isset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-221014@lists.php.net to get a copy of this message | ||
Empty array is set, but equal NULL.
<?php
$A=[];
var_dump($A);
if(isset($A)) print "Isset...\n"; // TRUE
if($A==NULL) print "[]==NULL\n"; // TRUE
if($A!=NULL) print "[]!=NULL\n"; // FALSE
if($A===NULL) print "[]===NULL\n"; // FALSE
if($A!==NULL) print "[]!==NULL\n"; // TRUE
?>
----
Server IP: 45.112.84.4
Probable Submitter: 45.91.157.134 (proxied: 62.140.252.3)
----
Manual Page -- https://php.net/manual/en/function.isset.php
Edit -- https://main.php.net/note/edit/129060
Del: integrated -- https://main.php.net/note/delete/129060/integrated
Del: useless -- https://main.php.net/note/delete/129060/useless
Del: bad code -- https://main.php.net/note/delete/129060/bad+code
Del: spam -- https://main.php.net/note/delete/129060/spam
Del: non-english -- https://main.php.net/note/delete/129060/non-english
Del: in docs -- https://main.php.net/note/delete/129060/in+docs
Del: other reasons-- https://main.php.net/note/delete/129060
Reject -- https://main.php.net/note/reject/129060
Search -- https://main.php.net/manage/user-notes.php