is_null, empty, isset, unset Let’s take a look at the description of these four functions first.
isset determines whether the variable already exists (configuration)
unset deletes (releases) the variable
empty determines whether the variable is empty
is_null determines whether the variable is NULL
ok, people have already started . So to start, apart from unset, the other three of these four functions are judgment functions. Unset is the first to go out because it can't make mistakes. The second is is_null. We can think of it as !isset, which is an inverse operation of isset. , the following table can clearly illustrate the relationship between them:
Of course, if you just want to do the following:
echo !isset($_GET['a']); //If you can’t get the value of variable a
echo empty($_GET['a'] ); //If the value of variable a is empty
Then the result is the same and can be used.