I have a class and I would like to create a function to clear all variables within the object, regardless of how many variables are added or taken out. Something like this..

class object()
{
$a;
$b;
$c;

function clear_data()
{
foreach(variable in this object)
variable = null;
}
}

Is there a built in PHP function to handle this?