Hi,
how do I "explicitly destroy" an Object in PHP5 to make sure the
destructor is called an the object destroyed?
unset is not an option because there are multiple variables containing
the object handle.
Waiting for the end of the script is aswell a bad option because the
order in which the destructores are called does matter.
So what else could be done to "explicitly destroy" the object?
If i simply call __destruct it would be called twice, bad aswell.
Since I have intensively searched the manual I fear there is no C++
like "delete Obj" construct in PHP. I really wonder why this is not
the case since destructors exist and the other OOP features of PHP5
seem really fine.
Any Ideas?
Best Regards
Thomas Ilsche
how do I "explicitly destroy" an Object in PHP5 to make sure the
destructor is called an the object destroyed?
unset is not an option because there are multiple variables containing
the object handle.
Waiting for the end of the script is aswell a bad option because the
order in which the destructores are called does matter.
So what else could be done to "explicitly destroy" the object?
If i simply call __destruct it would be called twice, bad aswell.
Since I have intensively searched the manual I fear there is no C++
like "delete Obj" construct in PHP. I really wonder why this is not
the case since destructors exist and the other OOP features of PHP5
seem really fine.
Any Ideas?
Best Regards
Thomas Ilsche
Comment