Doc #74399 [Ver->Csd]: ob_*clean* methods do not respect missing cleanable flag; same for flushing
| From: | girgias@php.net | Date: | Sun, 07 Jan 2024 14:04:45 +0000 |
| Subject: | Doc #74399 [Ver->Csd]: ob_*clean* methods do not respect missing cleanable flag; same for flushing | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-19693@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=74399&edit=1
ID: 74399
Updated by: girgias@php.net
Reported by: krody dot robi at gmail dot com
Summary: ob_*clean* methods do not respect missing cleanable
flag; same for flushing
-Status: Verified
+Status: Closed
Type: Documentation Problem
Package: Output Control
Operating System: Irrelevant
PHP Version: 7.1.3
-Assigned To:
+Assigned To: girgias
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2024-01-07 14:03:53] girgias@php.net
Closed by https://github.com/php/doc-en/pull/3073
------------------------------------------------------------------------
[2017-04-28 07:50:41] requinix@php.net
Then this is a doc bug because all four functions claim they need the respective CLEANABLE/FLUSHABLE
flag to work.
------------------------------------------------------------------------
[2017-04-28 07:48:47] mike@php.net
See also bug #69404
------------------------------------------------------------------------
[2017-04-28 07:43:24] mike@php.net
Unfortunately there's no one-to-one correlation between the legacy userland function names and
the flags of the new output API.
- ob_end_flush() is actually a finalize & send and not a "flush" in a strict sense
- ob_get_flush() is a finalize & send action, too
- ob_end_clean() is actually a discard & remove and not a "clean" in a strict sense
- ob_get_clean() is a finalize & remove action
I know, the legacy function names are bad and confusing, but were kept for BC, as was their
functionality.
------------------------------------------------------------------------
[2017-04-10 08:05:57] requinix@php.net
Goes back to when the flags were introduced in 5.4: https://3v4l.org/G1Eqn
Indeed, CLEANABLE only affects ob_clean() and FLUSHABLE only affects ob_flush(). Looks like it would
be fairly straightforward to add in.
The alternative would be adjusting the docs, but having those functions respect the flags makes
sense to me. And in the case of ob_end_clean and ob_end_flush I would expect both the
cleanable/flushable and the removable flags to be required.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=74399
--
Edit this bug report at https://bugs.php.net/bug.php?id=74399&edit=1