|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #76563 ob_get_clean does not call the ob_start callback
Submitted: 2018-07-02 15:14 UTC Modified: -
Avg. Score:4.7 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:1 (50.0%)
From: roland at nextendweb dot com Assigned:
Status: Open Package: Output Control
PHP Version: 7.2.7 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: roland at nextendweb dot com
New email:
PHP Version: OS:


 [2018-07-02 15:14 UTC] roland at nextendweb dot com
If you use ob_start with callback, the callback does not run, if you use ob_get_clean() on the same output buffer. The callback get skipped, which gives unexpected results. I think it is a bug.

Test script:
Expected output:
Parsed: asd<hr>


#2 ob_get_contents + ob_clean
Parsed: asd<hr>

Expected result:
Parsed: asd<hr>


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Mar 26 00:01:27 2019 UTC