I have a class in which class variables are set within some of the methods. The class has a __destruct() function that unsets class variables using the unset() function.
Right now I am listing all variables to unset in __destruct, but it seems like there should be a way to unset all.
For example, right now I am doing this:
function __destruct()
{
unset($this->variable1);
unset($this->variable2);
//et cetera
}
Surely there's so way to unset them ALL without listing them, right?