Marcus Boerger wrote: > Hello Gareth, > > __destruct will get executed during request shutdown after the > communication has been shutdown. The only way to be able to write > from within __destruct is to deinitialize it at the end of the > script and therefore before the request is being finished. To > do so you can use 'unset($object);' >
But then again why call destruct on the objects after the external modules have been shut down? This heavily confuses people and I see no apparent reason to do so (then again I'm not deep into the PHP internal structure)? I find it highly attractive to be able to save a "session"-object via my destructor / close DB connections - you name it. zend_objects_store_call_destructors(&EG(objects_store) TSRMLS_CC); before php_call_shutdown_functions(); etc. Can somebody enlighten me? ./regards Florian -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php