reference/outcontrol/functions/ob-end-flush.xml
86b976d5afaf037868174fe5c242e886eb69baa4
...
...
@@ -3,7 +3,10 @@
3
3
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.ob-end-flush">
4
4
<refnamediv>
5
5
<refname>ob_end_flush</refname>
6
-
<refpurpose>Flush (send) the output buffer and turn off output buffering</refpurpose>
6
+
<refpurpose>
7
+
Flush (send) the return value of the active output handler
8
+
and turn the active output buffer off
9
+
</refpurpose>
7
10
</refnamediv>
8
11

9
12
<refsect1 role="description">
...
...
@@ -13,35 +16,34 @@
13
16
<void/>
14
17
</methodsynopsis>
15
18
<para>
16
-
This function will send the contents of the topmost output buffer (if
17
-
any) and turn this output buffer off. If you want to further
18
-
process the buffer's contents you have to call
19
-
<function>ob_get_contents</function> before
20
-
<function>ob_end_flush</function> as the buffer contents are
21
-
discarded after <function>ob_end_flush</function> is called.
19
+
This function calls the output handler
20
+
(with the <constant>PHP_OUTPUT_HANDLER_FINAL</constant> flag),
21
+
flushes (sends) it's return value,
22
+
discards the contents of the active output buffer
23
+
and turns off the active output buffer.
22
24
</para>
23
25
<para>
24
-
The output buffer must be started by
25
-
<function>ob_start</function> with <link
26
-
linkend="constant.php-output-handler-flushable">PHP_OUTPUT_HANDLER_FLUSHABLE</link>
27
-
and <link
28
-
linkend="constant.php-output-handler-removable">PHP_OUTPUT_HANDLER_REMOVABLE</link>
29
-
flags. Otherwise <function>ob_end_flush</function> will not work.
26
+
<function>ob_end_flush</function> will fail
27
+
without an active output buffer started with the
28
+
<constant>PHP_OUTPUT_HANDLER_REMOVABLE</constant> flag.
30
29
</para>
31
-
<note>
32
-
<simpara>
33
-
This function is similar to <function>ob_get_flush</function>, except
34
-
that <function>ob_get_flush</function> returns the buffer as a string.
35
-
</simpara>
36
-
</note>
30
+
<para>
31
+
<function>ob_end_flush</function> will flush (send)
32
+
the return value of the output handler
33
+
even if the active output buffer was started without the
34
+
<constant>PHP_OUTPUT_HANDLER_FLUSHABLE</constant> flag.
35
+
</para>
36
+
</refsect1>
37
+

38
+
<refsect1 role="parameters">
39
+
&reftitle.parameters;
40
+
&no.function.parameters;
37
41
</refsect1>
38
42

39
43
<refsect1 role="returnvalues">
40
44
&reftitle.returnvalues;
41
45
<para>
42
-
&return.success; Reasons for failure are first that you called the
43
-
function without an active buffer or that for some reason a buffer could
44
-
not be deleted (possible for special buffer).
46
+
&return.success;
45
47
</para>
46
48
</refsect1>
47
49

...
...
@@ -78,15 +80,14 @@
78
80
<simplelist>
79
81
<member><function>ob_start</function></member>
80
82
<member><function>ob_get_contents</function></member>
81
-
<member><function>ob_get_flush</function></member>
82
83
<member><function>ob_flush</function></member>
84
+
<member><function>ob_get_flush</function></member>
83
85
<member><function>ob_end_clean</function></member>
84
86
</simplelist>
85
87
</para>
86
88
</refsect1>
87
89

88
90
</refentry>
89
-

90
91
<!-- Keep this comment at the end of the file
91
92
Local variables:
92
93
mode: sgml
93
94