php when and how to use (!empty) code example
Example: 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