php-doc-en/reference/outcontrol/functions/ob-get-length.xml
Nuno Lopes 26e3e3d224 fix example title (user note)
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@213198 c90b9560-bf6c-de11-be94-00142212c4b1
2006-05-17 19:45:49 +00:00

82 lines
1.7 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- splitted from ./en/functions/outcontrol.xml, last change in rev 1.22 -->
<refentry id="function.ob-get-length">
<refnamediv>
<refname>ob_get_length</refname>
<refpurpose>
Return the length of the output buffer
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<methodsynopsis>
<type>int</type><methodname>ob_get_length</methodname>
<void/>
</methodsynopsis>
<para>
This will return the length of the contents in the output buffer
or &false;, if output buffering isn't active.
</para>
<para>
<example>
<title>A simple <function>ob_get_length</function> example</title>
<programlisting role="php">
<![CDATA[
<?php
ob_start();
echo "Hello ";
$len1 = ob_get_length();
echo "World";
$len2 = ob_get_length();
ob_end_clean();
echo $len1 . ", ." . $len2;
?>
]]>
</programlisting>
<para>
Our example will output:
</para>
<screen>
<![CDATA[
6, 11
]]>
</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
-->