#33772 [NEW]: __destruct happens befor "hes" time
From: msipria at suomi24 dot fi
Operating system: Windows XP
PHP version: 5.1.0b3
PHP Bug Type: Class/Object related
Bug description: __destruct happens befor "hes" time
Description:
------------
I have session handling class and i have db class that i pass to the
session handling class.
As of PHP 5.1.0b1 order of going throu __destructers have been changed, so
at end eaven DB class exsist its __destucter has been runned.
removing __destruct from DB class will not help, coz mysql link has own
__destruct function that it will run.
i realy hope this is bug (that can fix) and it will be fixed, other whay
i'm stuck with 5.0.x or have to re write lots of source code.
Reproduce code:
---------------
http://www.wiofso.com/~msipria/testi.txt
Expected result:
----------------
In PHP 5.0.x (working)
__construct = LINK
open = LINK
read = LINK
write = LINK
close = LINK
__destruct = KILLED LINK
Actual result:
--------------
In PHP 5.1.0b3 (tested b1-b3) (not working)
__construct = LINK
open = LINK
read = LINK
__destruct = KILLED LINK
write = KILLED LINK
close = KILLED LINK
--
Edit bug report at http://bugs.php.net/?id=33772&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33772&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33772&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33772&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33772&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33772&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33772&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33772&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33772&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33772&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33772&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33772&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33772&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33772&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33772&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33772&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33772&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33772&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33772&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33772&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33772&r=mysqlcfg
Thread (8 messages)
- msipria at suomi24 dot fi