mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-27 14:28:56 +00:00

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146503 c90b9560-bf6c-de11-be94-00142212c4b1
79 lines
1.8 KiB
XML
79 lines
1.8 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.2 $ -->
|
|
<refentry id="function.ob-get-clean">
|
|
<refnamediv>
|
|
<refname>ob_get_clean</refname>
|
|
<refpurpose>
|
|
Get current buffer contents and delete current output buffer
|
|
</refpurpose>
|
|
</refnamediv>
|
|
<refsect1>
|
|
<title>Description</title>
|
|
<methodsynopsis>
|
|
<type>string</type><methodname>ob_get_clean</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
This will return the contents of the output buffer and end output
|
|
buffering. If output buffering isn't active then &false; is returned.
|
|
<function>ob_get_clean</function> essentially executes both
|
|
<function>ob_get_contents</function> and
|
|
<function>ob_end_clean</function>.
|
|
</para>
|
|
<para>
|
|
<example>
|
|
<title>A simple <function>ob_get_clean</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
ob_start();
|
|
|
|
echo "Hello World";
|
|
|
|
$out = ob_get_clean();
|
|
$out = strtolower($out);
|
|
|
|
var_dump($out);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
<para>
|
|
Our example will output:
|
|
</para>
|
|
<screen>
|
|
<![CDATA[
|
|
|
|
string(11) "hello world"
|
|
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
<para>
|
|
See also <function>ob_start</function> and
|
|
<function>ob_get_contents</function>.
|
|
</para>
|
|
</refsect1>
|
|
</refentry>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|