Solution to empty and isset-does PHP variable define a warning when accessing an undefined variable? Before use, you can use empty (); or isset () to determine whether the variable defines $ arr ['k1 ']. although $ arr is undefined, we can still use these two functions to solve empty and isset-determine whether PHP variables are defined.
PHP generates a warning when accessing an undefined variable.
?
You can use empty (); or isset () to determine whether a variable is defined.
$ Arr ['k1 ']; although $ arr is undefined, you can use these two functions to determine
If we use if to judge, what will happen? Undefined variable warning
?
The definition of a variable is different from that of setting the variable to null. When unset () is used, the variable is set to undefined.
?
No return or return in the function; call this function and the result is NULL.