On 3 June 2011 02:18, Arpad Ray <array...@gmail.com> wrote: > Hi, > > A while ago I submitted a patch to allow session_set_save_handler() to > accept a class, and support the inheritance of the default session > handler's methods. > > The RFC has a more detailed description and the current patch: > https://wiki.php.net/rfc/session-oo > > Changes since this was last discussed: > - More sanity checking to prevent handlers being called in unexpected states > - ZTS fixes > > Any thoughts? > > Regards, > > Arpad
Not an internals expert, but I do have a question. When would the session handler object be destroyed? If sessions are being logged to a DB (maybe via a userland PHP class), is internal reference counting enough to handle the order of destruction? If the DB connection is destroyed before the session handler gets it destructor called (or the session_write_close equivalent), the session won't be able to log the data and there would be no warning to the client as engine is in auto tidy up mode. Obviously, if the developer takes care and calls the destructors in the right order, then everything will be OK, but this is not something I see very often. What about circular references and interdependent references? -- Richard Quadling Twitter : EE : Zend : PHPDoc @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY : bit.ly/lFnVea -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php