Everyone
before the occasional encounter an error
Because I often use isset to determine whether there are set parameters, but previously found that in some cases, isset even if the KEY in the array there will be judged FALSE.
 
Originally, I always thought isset can replace array_key_exists to make judgments, but note that the official explanation for the isset is
 
"isset - Determine if a variable is set and is not NULL "
 
so it will be true even if the value is null or false Strong> not declared
, both false
This should pay special attention
 
 
 $ yy="";
$ Tt=array ( 'QQ'=& gt; $ yy);
echo isset ($ tt [ 'QQ'])? 'Y': 'N'; // true

$ Yy=false;
$ Tt=array ( 'QQ'=& gt; $ yy);
echo isset ($ tt [ 'QQ'])? 'Y': 'N'; // true

$ Yy=null;
$ Tt=array ( 'QQ'=& gt; $ yy);
'Y': 'N'; // false 


 
In fact, the focus is that when you do not understand why isset is false, you can not see the difference with print_r, which need special attention.
 
For your reference! Thanksgiving!