From: schroeter at liquidvision dot net Operating system: Winn2000 Server PHP version: 5.0.0RC1 PHP Bug Type: Class/Object related Bug description: Undesired behavior of class destructor
Description: ------------ The __destruct() method seems buggy as the destructor is called after some system internals are already cleaned up (e.g. mysql extension, session etc.). Thus it is impossible to set e.g. session data in the destructor, leaving this mostly superfluous! I have prepared an example that shows the point in detail. This is also true for e.g. mysql_close() in the destructor! Reproduce code: --------------- http://www.liquidvision.net/tomimg/php/destruct.php5 Expected result: ---------------- Please see comments in file. -- Edit bug report at http://bugs.php.net/?id=27903&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27903&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27903&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27903&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27903&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27903&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27903&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27903&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27903&r=support Expected behavior: http://bugs.php.net/fix.php?id=27903&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27903&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27903&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27903&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27903&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27903&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27903&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27903&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27903&r=float