<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.ob-get-status" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>ob_get_status</refname>
  <refpurpose>Get status of output buffers</refpurpose>
 </refnamediv>
 
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>array</type><methodname>ob_get_status</methodname>
   <methodparam choice="opt"><type>bool</type><parameter>full_status</parameter><initializer>&false;</initializer></methodparam>
  </methodsynopsis>
  <para>
   <function>ob_get_status</function> returns status information on either
   the top level output buffer or all active output buffer levels if
   <parameter>full_status</parameter> is set to &true;.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>full_status</parameter></term>
     <listitem>
      <para>
       &true; to return all active output buffer levels. If &false; or not
       set, only the top level output buffer is returned.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   If called without the <parameter>full_status</parameter> parameter
   or with <parameter>full_status</parameter> = &false; a simple array
   with the following elements is returned:
   <informalexample>
    <screen>
<![CDATA[
Array
(
    [level] => 2
    [type] => 0
    [status] => 0
    [name] => URL-Rewriter
    [del] => 1
)
]]>
    </screen>
   </informalexample>
   <segmentedlist>
    <title>Simple <function>ob_get_status</function> results</title>
    <segtitle>Key</segtitle><segtitle>Value</segtitle>
    <seglistitem><seg>level</seg><seg>Output nesting level</seg></seglistitem>
    <seglistitem><seg>type</seg><seg><literal>0</literal> (internal handler) or <literal>1</literal> (user supplied handler)</seg></seglistitem>
    <seglistitem><seg>status</seg><seg>One of <literal>PHP_OUTPUT_HANDLER_START</literal> (0), <literal>PHP_OUTPUT_HANDLER_CONT</literal> (1) or <literal>PHP_OUTPUT_HANDLER_END</literal> (2)</seg></seglistitem>
    <seglistitem><seg>name</seg><seg>Name of active output handler or ' default output handler' if none is set</seg></seglistitem>
    <seglistitem><seg>del</seg><seg>Erase-flag as set by <function>ob_start</function></seg></seglistitem>
   </segmentedlist>
  </para>
  <para>
   If called with <parameter>full_status</parameter> = &true; an array
   with one element for each active output buffer level is returned.
   The output level is used as key of the top level array and each array
   element itself is another array holding status information
   on one active output level.
   <informalexample>
    <screen>
<![CDATA[
Array
(
    [0] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 1
            [status] => 0
            [name] => default output handler
            [del] => 1
        )

    [1] => Array
        (
            [chunk_size] => 0
            [size] => 40960
            [block_size] => 10240
            [type] => 0
            [buffer_size] => 0
            [status] => 0
            [name] => URL-Rewriter
            [del] => 1
        )

)
]]>
    </screen>
   </informalexample>
  </para>
  <para>
   The full output contains these additional elements:
   <segmentedlist>
    <title>Full <function>ob_get_status</function> results</title>
    <segtitle>Key</segtitle><segtitle>Value</segtitle>
    <seglistitem><seg>chunk_size</seg><seg>Chunk size as set by <function>ob_start</function></seg></seglistitem>
    <seglistitem><seg>size</seg><seg>...</seg></seglistitem>
    <seglistitem><seg>blocksize</seg><seg>...</seg></seglistitem>
   </segmentedlist>
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>ob_get_level</function></member>
    <member><function>ob_list_handlers</function></member>
   </simplelist>
  </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:"~/.phpdoc/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
-->
