php delete in object according to key code example Example: delete property from object php unset($a->new_property);