#33772 [Opn->Ctl]: __destruct happens befor "hes" time
ID: 33772
Updated by: sniper@php.net
Reported By: msipria at suomi24 dot fi
-Status: Open
+Status: Critical
Bug Type: Class/Object related
-Operating System: Windows XP
+Operating System: *
-PHP Version: 5.1.0b3
+PHP Version: 5CVS-2005-07-19
New Comment:
I need this fixed too, it's not possible to use e.g. mysqli as save
handler otherwise..
Previous Comments:
------------------------------------------------------------------------
[2005-07-19 16:47:51] msipria at suomi24 dot fi
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 this bug report at http://bugs.php.net/?id=33772&edit=1
Thread (8 messages)