You are here: Change the order in which Objects are unloaded « PHP « IT news, forums, messages
Change the order in which Objects are unloaded

Posted by Niels Ganser on 09/09/05 22:12

Hi everybody.

I use a Debugger-Class to collect debugging information (now that was a
hard guess, wasn't it..) during script runtime. In order to collect
everything there is to collect, I instantiate a debugger object right at
the start of my scripts and unload this object at the very end of my
shutdown function.

Unfortunately as of PHP 5.0.5 objects get unloaded before the shutdown
function is even called and as Jani Taskinen pointed out [1] this
behaviour is very much intended and won't get changed (whatever the
reason for this decision might be..) with all related bugs marked Bogus
[2] or a documentation issue [3].

I have to admit that it wouldn't be much of a deal to store the debugging
information outside the object but I like the approach I took and fear
that I might run into other problems with objects getting destroyed
before others which depend on the previous ones, so my question is
(tadaa): Is there a way to sort of "customize" the order in which
objects are unloaded during the shutdown procedure? I have to stress
that defining the classes and/or instantiate the objects in a specific
order is _not_ an option.

Any hint would be appreciated. Thanks in advance,
Niels.


[1] http://marc.theaimsgroup.com/?l=php-dev&m=112556389406774
[2] http://bugs.php.net/bug.php?id=34377
[3] http://bugs.php.net/bug.php?id=33772

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация