<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.outcontrol.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.ob-get-status.php',
    1 => 'ob_get_status',
    2 => 'Get status of output buffers',
  ),
  'up' => 
  array (
    0 => 'ref.outcontrol.php',
    1 => 'Функції Контроля Виводу',
  ),
  'prev' => 
  array (
    0 => 'function.ob-get-level.php',
    1 => 'ob_get_level',
  ),
  'next' => 
  array (
    0 => 'function.ob-implicit-flush.php',
    1 => 'ob_implicit_flush',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/outcontrol/functions/ob-get-status.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ob-get-status" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ob_get_status</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.2.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ob_get_status</span> &mdash; <span class="dc-title">Get status of output buffers</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ob-get-status-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ob_get_status</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span> <code class="parameter">$full_status</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></span></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>ob_get_status()</strong></span> returns status information on either
   the top level output buffer or all active output buffer levels if
   <code class="parameter">full_status</code> is set to <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ob-get-status-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">full_status</code></dt>
     <dd>
      <p class="para">
       <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> to return all active output buffer levels. If <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> or not
       set, only the top level output buffer is returned.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ob-get-status-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   If <code class="parameter">full_status</code> is omitted or <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> a simple array
   holding status information on the active output level is returned.
  </p>
  <p class="para">
   If <code class="parameter">full_status</code> is <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> 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.
  </p>
  <p class="para">
   An empty array is returned if output buffering is not turned on.
  </p>
  <p class="para">
   <table class="segmentedlist">
    <caption><strong><span class="function"><strong>ob_get_status()</strong></span> return array elements</strong></caption>
    <thead><tr><th>Key</th><th>Value</th>
    </tr></thead><tbody><tr class="seglistitem">
     <td class="seg">name</td>
     <td class="seg">
      Name of active output handler (see the return values of
      <span class="function"><a href="function.ob-list-handlers.php" class="function">ob_list_handlers()</a></span> for details)
     </td>
    </tr>
    <tr class="seglistitem">
     <td class="seg">type</td>
     <td class="seg">
      <code class="literal">0</code> (internal handler) or
      <code class="literal">1</code> (user supplied handler)
     </td>
    </tr>
    <tr class="seglistitem">
     <td class="seg">flags</td>
     <td class="seg">
      Bitmask of flags set by <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>,
      the type of output handler (see above)
      and the status of the buffering process
      (<a href="outcontrol.constants.php#outcontrol.constants.flags-returned-by-handler" class="link">
       <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-start">PHP_OUTPUT_HANDLER_<span class="replaceable">*</span></a></code></strong>
      </a> constants).
      If the handler successfully processed the buffer and did not return <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>,
      <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-started">PHP_OUTPUT_HANDLER_STARTED</a></code></strong> and
      <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-processed">PHP_OUTPUT_HANDLER_PROCESSED</a></code></strong> will be set.
      If the handler failed while processing the buffer or returned <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>,
      <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-started">PHP_OUTPUT_HANDLER_STARTED</a></code></strong> and
      <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-disabled">PHP_OUTPUT_HANDLER_DISABLED</a></code></strong> will be set.
     </td>
    </tr>
    <tr class="seglistitem">
     <td class="seg">level</td>
     <td class="seg">
      Output nesting level (zero based). Note that the value returned for the
      same level by <span class="function"><a href="function.ob-get-level.php" class="function">ob_get_level()</a></span> is off by one.
      The first level is <code class="literal">0</code> for <span class="function"><strong>ob_get_status()</strong></span>,
      and <code class="literal">1</code> for <span class="function"><a href="function.ob-get-level.php" class="function">ob_get_level()</a></span>.
     </td>
    </tr>
    <tr class="seglistitem">
     <td class="seg">chunk_size</td>
     <td class="seg">
      Chunk size in bytes. Set by <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>
      or <a href="outcontrol.configuration.php#ini.output-buffering" class="link">output_buffering</a> is enabled
      and its value is set to a positive integer
     </td>
    </tr>
    <tr class="seglistitem">
     <td class="seg">buffer_size</td>
     <td class="seg">
      Output buffer size in bytes
     </td>
    </tr>
    <tr class="seglistitem">
     <td class="seg">buffer_used</td>
     <td class="seg">
      Size of data in output buffer in bytes
      (the same as the integer return value of <span class="function"><a href="function.ob-get-length.php" class="function">ob_get_length()</a></span>)
     </td>
    </tr>
   </tbody></table>
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ob-get-status-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 Array returned when <code class="parameter">full_status</code> is <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong></strong></p>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [name] =&gt; URL-Rewriter
    [type] =&gt; 0
    [flags] =&gt; 112
    [level] =&gt; 2
    [chunk_size] =&gt; 0
    [buffer_size] =&gt; 16384
    [buffer_used] =&gt; 1024
)</pre>
</div>
    </div>
   </div>
  </p>
  <p class="para">
   <div class="example" id="example-2">
    <p><strong>Приклад #2 Array returned when <code class="parameter">full_status</code> is <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong></strong></p>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Array
(
    [0] =&gt; Array
        (
            [name] =&gt; default output handler
            [type] =&gt; 0
            [flags] =&gt; 112
            [level] =&gt; 1
            [chunk_size] =&gt; 0
            [buffer_size] =&gt; 16384
            [buffer_used] =&gt; 2048
        )

    [1] =&gt; Array
        (
            [name] =&gt; URL-Rewriter
            [type] =&gt; 0
            [flags] =&gt; 112
            [level] =&gt; 2
            [chunk_size] =&gt; 0
            [buffer_size] =&gt; 16384
            [buffer_used] =&gt; 1024
        )

)</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ob-get-status-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ob-get-level.php" class="function" rel="rdfs-seeAlso">ob_get_level()</a> - Return the nesting level of the output buffering mechanism</span></li>
    <li><span class="function"><a href="function.ob-list-handlers.php" class="function" rel="rdfs-seeAlso">ob_list_handlers()</a> - List all output handlers in use</span></li>
    <li><span class="function"><a href="function.ob-get-length.php" class="function" rel="rdfs-seeAlso">ob_get_length()</a> - Return the length of the output buffer</span></li>
    <li><span class="function"><a href="function.ob-start.php" class="function" rel="rdfs-seeAlso">ob_start()</a> - Turn on output buffering</span></li>
   </ul>
  </p>
 </div>


</div><?php manual_footer($setup); ?>