You are here: Re: Shutdown order « PHP Programming Language « IT news, forums, messages
Re: Shutdown order

Posted by Thomas Mlynarczyk on 11/17/06 13:35

Also sprach Andy Hassall:

> It looks, from the mailing list post from the other part of the
> thread, that they have finally fixed this. It's been broken for a
> while, and was re-ordered but was still broken, and now the order
> makes sense so long as you have quite a recent version of PHP.

I had read somewhere that there was a discussion about calling the ob
function before the shutdown function and destructors. This would make more
sense to me, but I don't know if they actually did it in PHP 5.1.6 or 5.2.0.

> The shutdown function ordering didn't make sense previously, so you
> were seeing things you shouldn't have seen - objects who had their
> destructors already called before the rest of the script had actually
> run yet.

Yes, but the ob handler is still called last, i.e. *after* the destructors.
When I write my own error handler which "collects" error messages during
script execution and writes them to a file when the scripts ends, I must
make sure this writing occurs as the last step in my script. There seems to
be no elegant solution to this.

Greetings,
Thomas

 

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

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