#27903 [Fbk->NoF]: Undesired behavior of class destructor
| From: | php-bugs at lists dot php dot net | Date: | Wed, 01 Sep 2004 23:00:06 +0000 |
| Subject: | #27903 [Fbk->NoF]: Undesired behavior of class destructor | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-65596@lists.php.net to get a copy of this message | ||
ID: 27903
Updated by: php-bugs@lists.php.net
Reported By: schroeter at liquidvision dot net
-Status: Feedback
+Status: No Feedback
Bug Type: Class/Object related
Operating System: Winn2000 Server
PHP Version: 5.0.0RC1
New Comment:
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
Previous Comments:
------------------------------------------------------------------------
[2004-08-25 10:26:36] helly@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php4-STABLE-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php4-win32-STABLE-latest.zip
------------------------------------------------------------------------
[2004-08-25 03:21:24] alvaro at utahgateway dot com
I have to agree with schroeter.
Is there a reason why you can't call the code in the dtors before
shutting down the sessions.
------------------------------------------------------------------------
[2004-04-07 09:11:28] schroeter at liquidvision dot net
Anyways,
1. I disagree that this behavior is the way it should be. It does not
make sense to me that internal stuff is cleaned up before the user
defined stuff is?!
2. If it will remain this way, it has to made clear in the docs.
3. I found a workaround that will solve this:
just place a
register_shutdown_function(array(&$this, 'your class function'));
at the end of the __constructor function -this will give the desired
functionality.
I hope that will remain in future releases.
Thanks,
Tom
------------------------------------------------------------------------
[2004-04-07 09:11:01] derick@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
This is correct behavior, nothing we can fix most likely here for PHP
5.0.
------------------------------------------------------------------------
[2004-04-07 07:57:43] sniper@php.net
You need to redesign your stuff, the destructor works just fine. (don't
misuse it like you did)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/27903
--
Edit this bug report at http://bugs.php.net/?id=27903&edit=1