As far as I know (which is very little) , there are two ways, given:
$var = new object()
Then:
// Method 1: Set to null $va
This is a simple prove that you cannot destroy an object, you can only destroy a link to it.
$var = (object)['a'=>1]; $var2 = $var; $var2->a = 2; unset($var2); echo $var->a;
returns
2
See it in action here: https://eval.in/1054130