Re: destructors and output_buffering

From: Date: Sun, 31 Aug 2014 04:40:11 +0000
Subject: Re: destructors and output_buffering
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-76978@lists.php.net to get a copy of this message
Hi! > This is just a thought; could we delay the call to > zend_call_destructors ONLY IF there’s output buffering taking > place > (i.e. ob_get_level() > 0)? That wouldn't help - imagine this: 1. ob_start is set 2. shutdown is starting 3. ob functions shut down, call function foo 4. function foo creates an object of class FooBar 5. ob shutdown ends, all output is flushed, etc. 6. FooBar::__destruct is run and tries to output something That scenario still may have a problem. I'll check more into if it's really a big deal outputting after OB shutdown (after all, some other things may lead to it too) but conditioning dtor move does not solve this problem. If it works this way we may as well move them there permanently. -- Stanislav Malyshev, Software Architect SugarCRM: http://www.sugarcrm.com/

« previous php.internals (#76978) next »