Bug #76563 [Com]: ob_get_clean does not call the ob_start callback
Edit report at https://bugs.php.net/bug.php?id=76563&edit=1
ID: 76563
Comment by: calvet dot thomas at gmail dot com
Reported by: roland at nextendweb dot com
Summary: ob_get_clean does not call the ob_start callback
Status: Open
Type: Bug
Package: Output Control
PHP Version: 7.2.7
Block user comment: N
Private report: N
New Comment:
Just experienced the same behavior. That looks like a bug as well to me. If you ob_end_flush()
before the ob_end_clean(), it just works..
Previous Comments:
------------------------------------------------------------------------
[2018-07-02 15:14:13] roland at nextendweb dot com
Description:
------------
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>
#1:
ob_get_clean:
http://sandbox.onlinephpfunctions.com/code/9444bc54b4311c456f7e0f26d936c55b7114417a
Output:
asd
#2 ob_get_contents + ob_clean
http://sandbox.onlinephpfunctions.com/code/f4aa458142dfdb7867d662983504689bbba191b8
Output:
Parsed: asd<hr>
Expected result:
----------------
Output:
Parsed: asd<hr>
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76563&edit=1
Thread (4 messages)