unset($a->new_property);
//this is my code
if you want to add Properties to an object but also delete or remove,
all the previous Properties of the object, then we do this:-
<?php
$obj = (array)null;
$obj['attributes'] = '1234';
$obj['attributes'] = 'hello';
$obj = (object)$obj;
var_dump($obj);
?>