Empty is to determine if a variable is empty, and empty () returns FALSE if the variable is a non-null or nonzero value. In other words, "", 0, "0″, NULL, FALSE, Array (), Var $var, undefined, and objects that do not have any properties will be considered empty, and if Var is null, it returns TRUE." (1) Number 0; (2) null character; (3) A variable defined as null; (4) A variable defined as false; (5) an empty array; (6) an undefined variable. )
Empty will be judged to be NULL for the variable to return true
Isset determines whether a variable is set and returns TRUE if the variable exists (not null), otherwise FALSE (including undefined). The variable value is set to: null, and the variable is canceled after the return is also false;unset a variable. Note that isset for null value variables, special handling.
The above describes the empty string exception hint of the difference between empty and isset, including the empty string exception hint content, I hope the PHP tutorial interested in a friend helpful.