php check if object is empty code example
Example 1: php empty object
$x = new stdClass();
Example 2: php check for empty string
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';
}
$x = new stdClass();
if (empty($var)) {
echo '$var is either 0, empty, or not set at all';
}