If I have an stdObject
say, $a
.
Sure there's no problem to assign a new property, $a
,
$a->new_property = $xyz;
But then I want to remove it, so unset
is of no help here.
So,
$a->new_property = null;
is kind of it. But is there a more 'elegant' way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…