php variable = empty code example
Example 1: php empty
/*
* Determine whether a variable is considered to be empty.
* A variable is considered empty if it does not exist or if its value equals false (is a falsey).
*/
empty(''); // true
empty('0'); // true
empty(0); // true
empty(null); // true
empty([]); // true
empty('false'); // false
empty('true'); // false
Example 2: php check empty variable
empty var php