Recently I noticed that setting a variable to NULL causes it to evaluate as unset, tho no warning or errors are thrown if the variable is mentioned later in the script if the variable is used.
echo $myVAr; // throws warning
echo isset($myVar) ? 'yes':'no'; //echoes 'no'
$myVAr.+=" more text"'; // throws warning
echo isset($myVar) ? 'yes':'no'; //echoes 'no'
$myVA =" some text";
echo isset($myVar) ? 'yes':'no'; //ouputs 'yes'
echo $myVAr; // ouputs " some text";
$myVA = NULL;
echo $myVAr.' nothing!'; // ouputs ' nothing!';
echo isset($myVar) ? 'yes':'no'; //ouputs 'no'?!?
I what is the method the islet function uses to figure out that a variable is set?
I thought it checked to see if the variable was used in the namespace , regardless of value?
If you have a variable that holds the value of NULL, how could you set if it’s checked?
thanks all , in advance