reference/outcontrol/functions/ob-flush.xml
a866f72f5334d05a2cdfe9dd423eedd071192ff8
...
...
@@ -3,7 +3,7 @@
3
3
<refentry xml:id="function.ob-flush" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ob_flush</refname>
6
-
<refpurpose>Flush (send) the output buffer</refpurpose>
6
+
<refpurpose>Flush (send) the return value of the active output handler</refpurpose>
7
7
</refnamediv>
8
8

9
9
<refsect1 role="description">
...
...
@@ -13,15 +13,19 @@
13
13
<void/>
14
14
</methodsynopsis>
15
15
<para>
16
-
This function will send the contents of the output buffer (if any). If you
17
-
want to further process the buffer's contents you have to call
18
-
<function>ob_get_contents</function> before <function>ob_flush</function>
19
-
as the buffer contents are discarded after <function>ob_flush</function>
20
-
is called.
16
+
This function calls the output handler
17
+
(with the <constant>PHP_OUTPUT_HANDLER_FLUSH</constant> flag),
18
+
flushes (sends) its return value
19
+
and discards the contents of the active output buffer.
21
20
</para>
22
21
<para>
23
-
This function does not destroy the output buffer like
24
-
<function>ob_end_flush</function> does.
22
+
This function does not turn off the active output buffer like
23
+
<function>ob_end_flush</function> or <function>ob_get_flush</function> does.
24
+
</para>
25
+
<para>
26
+
<function>ob_flush</function> will fail
27
+
without an active output buffer started with the
28
+
<constant>PHP_OUTPUT_HANDLER_FLUSHABLE</constant> flag.
25
29
</para>
26
30
</refsect1>
27
31

...
...
@@ -37,14 +41,22 @@
37
41
</para>
38
42
</refsect1>
39
43

44
+
<refsect1 role="errors">
45
+
&reftitle.errors;
46
+
<para>
47
+
If the function fails it generates an <constant>E_NOTICE</constant>.
48
+
</para>
49
+
</refsect1>
50
+

40
51
<refsect1 role="seealso">
41
52
&reftitle.seealso;
42
53
<para>
43
54
<simplelist>
55
+
<member><function>ob_start</function></member>
44
56
<member><function>ob_get_contents</function></member>
45
-
<member><function>ob_clean</function></member>
46
57
<member><function>ob_end_flush</function></member>
47
-
<member><function>ob_end_clean</function></member>
58
+
<member><function>ob_get_flush</function></member>
59
+
<member><function>ob_clean</function></member>
48
60
</simplelist>
49
61
</para>
50
62
</refsect1>
51
63