Doc #80673 [Asn->Csd]: Be explicit about the order in which to call flush() and ob_flush()
| From: | cmb@php.net | Date: | Thu, 28 Jan 2021 11:34:54 +0000 |
| Subject: | Doc #80673 [Asn->Csd]: Be explicit about the order in which to call flush() and ob_flush() | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-18455@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=80673&edit=1
ID: 80673
Updated by: cmb@php.net
Reported by: php4fan at gmail dot com
Summary: Be explicit about the order in which to call flush()
and ob_flush()
-Status: Assigned
+Status: Closed
Type: Documentation Problem
Package: Documentation problem
Operating System: all
PHP Version: Irrelevant
Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
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()
Previous Comments:
------------------------------------------------------------------------
[2021-01-26 19:24:50] 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-26 18:35:57] 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 [...]"
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80673&edit=1