php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #36383 ob_implicit_flush() does not disable output buffering
Submitted: 2006-02-13 17:09 UTC Modified: 2006-03-09 04:22 UTC
From: david at acz dot org Assigned:
Status: Closed Package: Documentation problem
PHP Version: 5.1-200602151530 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: david at acz dot org
New email:
PHP Version: OS:

 

 [2006-02-13 17:09 UTC] david at acz dot org
Description:
------------
The documentation for ob_implicit_flush says that

"Turning implicit flushing on will disable output buffering, the output buffers current output will be sent as if ob_end_flush() had been called."

This is not the case.

If this is indeed the correct behavior, please update the documentation to reflect that and add an example such as the following:

    ob_implicit_flush(true);
    while (@ob_end_flush());


Reproduce code:
---------------
    ob_start();
    ob_implicit_flush(true);
    var_dump(ob_end_flush());


Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-13 19:09 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2006-02-15 18:00 UTC] david at acz dot org
Same thing:

php5.1-200602151530$ sapi/cgi/php -q
<?
    ob_start();
    ob_implicit_flush(true);
    var_dump(ob_end_flush());
?>
bool(true)

Another test:

php5.1-200602151530$ sapi/cgi/php -q
<?
    ob_start();
    echo "hello\n";
    ob_implicit_flush(true);
    echo "bye\n";
    ob_end_clean();
?>
(no output)

The ob_implicit_flush() function is not disabling output buffering or sending the current output as the documentation says it should.
 [2006-03-08 16:11 UTC] mike@php.net
This is a documentation problem.

Unlike the manual says, ob_implicit_flush() does neither end output buffering, nor does it flush the current output buffer.

It just causes a flush() when something actually gets written to the webserver.

 [2006-03-09 04:22 UTC] takagi@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 07 10:01:34 2025 UTC