|
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
[Back to original message]
|