Re: status of __destruct
| From: | Andi Gutmans | Date: | Fri, 05 Dec 2003 16:07:07 +0000 |
| Subject: | Re: status of __destruct | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-6237@lists.php.net to get a copy of this message | ||
Destructors are only called during a clean shutdown (i.e. no E_ERROR). They should actually be called by an exit() call. Can you post a short reproducing script (maybe with a print instead of a touch()) that displays this problem?
Andi
At 11:45 AM 12/5/2003 +0100, John Huntjens wrote:
What the status of destruct, should it work? I am asking because all the simple provided examples work, but in a more complex situation __destruct is never called. Is destruct called on a object when a exit is issued? for debugging I use this destruct: function __destruct() { touch("/tmp/destruct_app.txt"); } I am using todays snap (06.30) Gr, JOhn -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php