Doc #66758 [ReO]: Flags and control output buffering functions

From: Date: Tue, 15 Jul 2014 23:07:51 +0000
Subject: Doc #66758 [ReO]: Flags and control output buffering functions
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-11376@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66758&edit=1 ID: 66758 Updated by: yohgaki@php.net Reported by: krzysiekpiasecki at yahoo dot com Summary: Flags and control output buffering functions Status: Re-Opened Type: Documentation Problem Package: Output Control Operating System: MAC OS X 10.8.5 PHP Version: 5.5.8 Assigned To: yohgaki Block user comment: N Private report: N New Comment: No problem for documenting. ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE); I thought it would be nicer if ob_end_clean() raises error for removing and clean output, but documentation should be ok. Previous Comments: ------------------------------------------------------------------------ [2014-07-15 18:22:24] mike@php.net Forgot to assign back :P ------------------------------------------------------------------------ [2014-07-07 07:50:12] mike@php.net Silly me. Re-opening as a doc issue. JFYI the behavior is that way since PHP-5.4.0 ------------------------------------------------------------------------ [2014-07-07 07:47:58] mike@php.net Control is more fine grained now; you need to add PHP_OUTPUT_HANDLER_REMOVABLE to be able to pop it off the stack: ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE | PHP_OUTPUT_HANDLER_REMOVABLE); Or if flushing is also allowed (good idea), you can use PHP_OUTPUT_HANDLER_STDFLAGS, which includes all three capabilities. ------------------------------------------------------------------------ [2014-07-07 05:26:43] yohgaki@php.net Verified on my Fedora 20 with PHP 5.5.14. This seems a bug rather than doc issue. What do you think, mike? ob_start(null, 0, PHP_OUTPUT_HANDLER_CLEANABLE); echo 'AAA'; ob_end_clean(); This code does not clean buffer, raises error, then outputs 'AAA'. ------------------------------------------------------------------------ [2014-02-23 22:46:36] krzysiekpiasecki at yahoo dot com Version is 5.5.8 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=66758 -- Edit this bug report at https://bugs.php.net/bug.php?id=66758&edit=1

« previous php.doc.bugs (#11376) next »