Req #47123 [Opn->Wfx]: Robust Output Buffer Control

From: Date: Tue, 15 Jul 2014 22:28:58 +0000
Subject: Req #47123 [Opn->Wfx]: Robust Output Buffer Control
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186648@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=47123&edit=1 ID: 47123 Updated by: yohgaki@php.net Reported by: shepnorfleet at verizon dot net Summary: Robust Output Buffer Control -Status: Open +Status: Wont fix Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: linux PHP Version: 5.3.0alpha3 -Assigned To: +Assigned To: mike Block user comment: N Private report: N New Comment: This is how output buffer should work. I understand use cases for this request. However, if you would like to insert/append data, you should insert/append during output, not into certain buffer. IMO. Please note that output buffer may flush automatically and the result is unpredictable. When whole data is buffered, appending data to parent buffer will be the same as inserting data. I don't think this feature is needed. Mike might be interested in this feature. So I assigned this bug to him with wont fix status. Previous Comments: ------------------------------------------------------------------------ [2009-01-16 03:26:09] shepnorfleet at verizon dot net Description: ------------ I would like to request the ability to place output at the front of the existing buffer. I have placed an example CONOP in the 'Reproduce Code' section. I did some experimentation with nesting but it doesn't seem to help me, please see the 'Expected Result' section to see if I understand it correctly. Reproduce code: --------------- <? class Document { ... function __destruct() { /* * By the time I get here the document has accumulated * javascript, and stylesheet includes. My document * object ensures that these occur in the proper place * in the HTML document. */ //New output goes to the front of the buffer. ob_insert(); //write <html><head><title><style><script><body> tags $this->beginHTML(); //Return to normal buffering mode ob_append(); //write defered <script> and </body></html> tags $this->endHTML(); ob_end_flush(); //All done } ?> Expected result: ---------------- <? //Nesting doesn't seem to help ob_start(); print "1"; ob_start(); print "2"; ob_end_flush(); print "3"; ob_end_flush(); ?> output is: 123 not: 213 I need 213 not 123, see? ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=47123&edit=1

« previous php.bugs (#186648) next »