php check empty object 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';
}