Detection of variables
Isset ($var/// using isset to check if a variable exists, this PHP comes with a method that is often used later
// Test---Example 1: if (Isset ($a)) { " variable a exists ";}Else{ " variable A does not exist " ;}
Results of the output
Variable A does not exist // because A is not defined
Example 2 below:
$b =null// defined as nullif(Isset ($b)) { " variable B exists " ;}Else{ " variable B does not exist ";}
Results:
Variable B does not exist // variable B is determined to not exist // Although it is determined if there is a variable in memory, it is not related to the value of the variable. However, if you use Isset to test a variable that is set to NULL, FALSE is returned. // Then there is the example 2 output variable B does not exist result.
Example 3:
$c ='// defined as nullif(Isset ($c)) { " variable C exists ";}Else{ " variable C does not exist ";} // Output results
C is an empty string variable, its value is not empty?, in fact, it is empty, but its value is empty, like a person, there is a bank card, but there is no money in the card,
C is an empty string or a 0 variable is present, and it is loaded with something--and value. It's just too few things to pack.
Variable C exists
PS: Use isset to check the variable, if the variable is null will be returned false
php-Base "Variable detection"