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,27 +16,23 @@
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.
29
+
</para>
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.
30
35
</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>
37
36
</refsect1>
38
37

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

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

93
90
</refentry>
94
-

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