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

Posted by petersprc on 11/17/06 01:37

If the behavior did change in the future, you might be able to just
call flush() explicitly at the end of your script, to trigger your
output buffer callback before the global objects were finalized.

Thomas Mlynarczyk wrote:
> Also sprach petersprc@gmail.com:
>
> [PHP 5.1.6:
> (1) registered shutdown functions,
> (2) Destructors,
> (3) ob buffers]
>
> > Maybe step 2 only invokes the destructor, leaving de-allocation to be
> > done later?
>
> In this case I should not rely upon the behaviour I observed? But as my
> object is in global scope, it would seem more logical to me to "keep it
> alive" until *after* the last of the three steps (as $GLOBALS should live
> that long), in which case its destructor should not be called before.
>
> > http://www.zend.com/lists/php-dev/200509/msg00064.html
>
> Thank you for this link. I think, the behaviour described there refers to an
> older version (PHP 5.0.5) in which the destructors were called *before* the
> shutdown functions. So it does not explain why I should be able to access an
> object after its destructor has been called.
>
> 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

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