I have some classes from which I create objects. In the __construct function I check the properties. If they do not match I would like to delete the created object.
$example = new example('Value 1', 2, false);
foreach (get_object_vars($this) as $propertie => $value) {
if (empty($value)) {
// unset(); What i have to insert in unset() ?
}
}
Thanks!