reference/outcontrol/functions/ob-clean.xml
86b976d5afaf037868174fe5c242e886eb69baa4
...
...
@@ -3,7 +3,7 @@
3
3
<refentry xml:id="function.ob-clean" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>ob_clean</refname>
6
-
<refpurpose>Clean (erase) the output buffer</refpurpose>
6
+
<refpurpose>Clean (erase) the contents of the active output buffer</refpurpose>
7
7
</refnamediv>
8
8

9
9
<refsect1 role="description">
...
...
@@ -13,17 +13,19 @@
13
13
<void/>
14
14
</methodsynopsis>
15
15
<para>
16
-
This function discards the contents of the output buffer.
16
+
This function calls the output handler
17
+
(with the <constant>PHP_OUTPUT_HANDLER_CLEAN</constant> flag),
18
+
discards it's return value
19
+
and cleans (erases) the contents of the active output buffer.
17
20
</para>
18
21
<para>
19
-
This function does not destroy the output buffer like
20
-
<function>ob_end_clean</function> does.
22
+
This function does not turn off the active output buffer like
23
+
<function>ob_end_clean</function> or <function>ob_get_clean</function> does.
21
24
</para>
22
25
<para>
23
-
The output buffer must be started by
24
-
<function>ob_start</function> with <link
25
-
linkend="constant.php-output-handler-cleanable">PHP_OUTPUT_HANDLER_CLEANABLE</link>
26
-
flag. Otherwise <function>ob_clean</function> will not work.
26
+
<function>ob_clean</function> will fail
27
+
without an active output buffer started with the
28
+
<constant>PHP_OUTPUT_HANDLER_CLEANABLE</constant> flag.
27
29
</para>
28
30
</refsect1>
29
31

...
...
@@ -39,13 +41,22 @@
39
41
</para>
40
42
</refsect1>
41
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
+

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