I would like to check, if any of the properties of an object is empty, without manually checking each one. This is how I do it now:
class MyClass {
public $a;
public $b;
public $c;
}
Then:
$item = new MyClass();
// ...
$item->a = 10;
$item->b = 20;
// ...
// TODO:
$hasEmpty = empty($item->a) || empty($item->b) || empty($item->c);
How is it possible without manually checking each property?