|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #62261 ob_start callback flags have changed
Submitted: 2012-06-08 08:25 UTC Modified: 2012-06-09 22:36 UTC
From: casper at langemeijer dot eu Assigned: frozenfire (profile)
Status: Closed Package: Output Control
PHP Version: 5.4.3 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: casper at langemeijer dot eu
New email:
PHP Version: OS:


 [2012-06-08 08:25 UTC] casper at langemeijer dot eu
In my investigations on bug #61272 I found that since the output buffering 
rewrite in PHP 5.4 the flags passed to the second parameter of the callback 
passed to ob_start() have changed.

See the test in tests/output/ob_017.phpt and run the new test on PHP 5.3. From 
the output I've discovered the following: (might not be complete)

- PHP_OUTPUT_HANDLER_CONT seems to have a new meaning. It use to signal: more is 
coming. Now it means: this is a continuation of something you've received 

- A new constant with value 8 seems to have been introduced. I don't know it's 
meaning, but I'm guessing it means output buffering will be ended after this 
call (ob_end_clean() causes a call to the callback with the 8 flag set)

BTW: I think the new situation is better, but needs to be documented. Especially 
because this is a functional change.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-06-09 22:35 UTC]
Automatic comment from SVN on behalf of frozenfire
Log: Documented PHP_OUTPUT_HANDLER_* constants.
Updated ob_start() function output_callback parameter description to refer to PHP_OUTPUT_HANDLER_* constants collectively.
Removed empty PHP_OUTPUT_HANDLER_* constants from reserved.constants.core.
Closes bug #62261.
 [2012-06-09 22:36 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: frozenfire
 [2012-06-09 22:36 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at

 For Windows:
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Fri Mar 31 20:03:38 2023 UTC