php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #80673 Be explicit about the order in which to call flush() and ob_flush()
Submitted: 2021-01-26 18:35 UTC Modified: 2021-01-28 11:34 UTC
From: php4fan at gmail dot com Assigned: cmb (profile)
Status: Closed Package: Documentation problem
PHP Version: Irrelevant OS: all
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php4fan at gmail dot com
New email:
PHP Version: OS:

 

 [2021-01-26 18:35 UTC] php4fan at gmail dot com
Description:
------------
---
From manual page: https://php.net/function.flush
---

"This means you will have to call both ob_flush() and flush() to flush the ob output buffers if you are using those."

Why do you need to be so annoyingly vague?? Call both, but in what order? If it is in the order they are mentioned, be explicit about it, e.g.:

"This means you will have to call both ob_flush() and flush() IN THIS ORDER to  [...]"




Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-01-26 19:24 UTC] dharman@php.net
Thanks for the suggestion. Please note that PHP is an open source project. The source code, as well as the documentation pages, are listed publicly on GitHub and the project happily accepts PRs. There's no need to be impolite when you find something that can be improved. The project is alive thanks to volunteers. Instead of saying "Why do you need to be so annoyingly vague??" you can suggest a PR with an improvement that you think will help other people understand it easier. 

As for me, I don't find anything vague about this. The context explains pretty clearly what is meant by this. Of course, I am reading it through the glasses of an experienced PHP developer. The sentence just before that one explains why you need to flush the output buffering: "It also doesn't affect PHP's userspace output buffering mechanism." Also, I humbly admit that my understanding might be flawed, which is why your suggestion remains valuable. 

How about we change it to:

"This means ob_flush() should be called before flush() to flush the output buffers if they are in use."

Please feel free to submit a PR with the above sentence if you like it.
 [2021-01-28 11:34 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2021-01-28 11:34 UTC] cmb@php.net
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=doc/en.git;a=commit;h=084841342704e43aa4fceb205453f9bd3f257d87
Log: Fix #80673: Be explicit about the order in which to call flush() and ob_flush()
 [2021-01-28 11:34 UTC] cmb@php.net
-Status: Assigned +Status: Closed
 [2021-01-28 15:49 UTC] mumumu@php.net
Automatic comment on behalf of mumumu@mumumu.org
Revision: http://git.php.net/?p=doc/ja.git;a=commit;h=ceac540852c15c65b7a5a2436184c2a754707e6e
Log: Fix #80673: Be explicit about the order in which to call flush() and ob_flush()
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 06:01:30 2024 UTC