<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/book.outcontrol.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ru',
  ),
  'this' => 
  array (
    0 => 'outcontrol.constants.php',
    1 => 'Предопределённые константы',
    2 => 'Предопределённые константы',
  ),
  'up' => 
  array (
    0 => 'book.outcontrol.php',
    1 => 'Контроль вывода',
  ),
  'prev' => 
  array (
    0 => 'outcontrol.configuration.php',
    1 => 'Настройка во время выполнения',
  ),
  'next' => 
  array (
    0 => 'outcontrol.output-buffering.php',
    1 => 'Буферизация вывода',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ru',
    'path' => 'reference/outcontrol/constants.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="outcontrol.constants" class="appendix">
 <h1 class="title">Предопределённые константы</h1>

 <p class="simpara">
Следующие константы доступны как часть ядра PHP.
</p>
 <dl id="outcontrol.constants.flags-passed-to-handler">
  <strong class="title">Флаги состояния, которые передают обработчику вывода</strong>
  <p class="para">
   Следующие флаги передают как часть битовой маски в параметр
   <code class="parameter">phase</code> — второй параметр обработчика вывода,
   который установили функцией <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>:
  </p>
  
   <dt id="constant.php-output-handler-start">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-start">PHP_OUTPUT_HANDLER_START</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Указывает, что буферизация вывода началась.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-write">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-write">PHP_OUTPUT_HANDLER_WRITE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Указывает, что буфер вывода очищается и буфер содержит данные для вывода.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-flush">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-flush">PHP_OUTPUT_HANDLER_FLUSH</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Означает, что буфер сбросился — очистился и вывелся.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-clean">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-clean">PHP_OUTPUT_HANDLER_CLEAN</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Означает, что буфер очистился.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-final">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-final">PHP_OUTPUT_HANDLER_FINAL</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Означает, что это последняя операция буферизации.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-cont">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-cont">PHP_OUTPUT_HANDLER_CONT</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Означает, что буфер очистился, но буферизация вывода продолжится.
    </p>
    <p class="para">
     Это синоним для
     <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-write">PHP_OUTPUT_HANDLER_WRITE</a></code></strong>.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-end">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-end">PHP_OUTPUT_HANDLER_END</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Означает, что буферизация вывода завершилась.
    </p>
    <p class="para">
     Это синоним для
     <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-final">PHP_OUTPUT_HANDLER_FINAL</a></code></strong>.
    </p>
   </dd>
  
 </dl>
 <dl id="outcontrol.constants.buffer-control-flags">
  <strong class="title">Флаги управления буфером вывода</strong>
  <p class="para">
   Следующие флаги передают в виде битовой маски
   в параметр <code class="parameter">flags</code> — третий параметр обработчика вывода,
   который установили функцией <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>:
  </p>
  
   <dt id="constant.php-output-handler-cleanable">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-cleanable">PHP_OUTPUT_HANDLER_CLEANABLE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Определяет, готов ли буфер вывода, который создали
     функцией <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>, к очистке
     функцией <span class="function"><a href="function.ob-clean.php" class="function">ob_clean()</a></span>.
     Это флаг не управляет поведением функций
     <span class="function"><a href="function.ob-end-clean.php" class="function">ob_end_clean()</a></span> или <span class="function"><a href="function.ob-get-clean.php" class="function">ob_get_clean()</a></span>.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-flushable">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-flushable">PHP_OUTPUT_HANDLER_FLUSHABLE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Определяет, готов ли буфер вывода, который создали
     функцией <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>, к сбросу — выводу и очистке —
     функцией <span class="function"><a href="function.ob-flush.php" class="function">ob_flush()</a></span>.
     Это флаг не управляет поведением функций
     <span class="function"><a href="function.ob-end-flush.php" class="function">ob_end_flush()</a></span> или <span class="function"><a href="function.ob-get-flush.php" class="function">ob_get_flush()</a></span>.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-removable">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-removable">PHP_OUTPUT_HANDLER_REMOVABLE</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Определяет, готов ли буфер вывода, который создали
     функцией <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>, к удалению до завершения
     скрипта или при вызове функций
     <span class="function"><a href="function.ob-end-clean.php" class="function">ob_end_clean()</a></span>, <span class="function"><a href="function.ob-end-flush.php" class="function">ob_end_flush()</a></span>,
     <span class="function"><a href="function.ob-get-clean.php" class="function">ob_get_clean()</a></span> или <span class="function"><a href="function.ob-get-flush.php" class="function">ob_get_flush()</a></span>.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-stdflags">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-stdflags">PHP_OUTPUT_HANDLER_STDFLAGS</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Значение по умолчанию для флагов буфера вывода. Равняется
     <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-cleanable">PHP_OUTPUT_HANDLER_CLEANABLE</a></code></strong> |
     <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-flushable">PHP_OUTPUT_HANDLER_FLUSHABLE</a></code></strong> |
     <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-removable">PHP_OUTPUT_HANDLER_REMOVABLE</a></code></strong>.
    </p>
   </dd>
  
 </dl>
 <dl id="outcontrol.constants.flags-returned-by-handler">
  <strong class="title">Флаги статуса обработчика вывода</strong>
  <p class="para">
   Следующие флаги — часть битовой маски ключа <code class="literal">flags</code>
   массива, который возвращает функция <span class="function"><a href="function.ob-get-status.php" class="function">ob_get_status()</a></span>:
  </p>
  
   <dt id="constant.php-output-handler-started">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-started">PHP_OUTPUT_HANDLER_STARTED</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Означает, что вызвали обработчик вывода.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-disabled">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-disabled">PHP_OUTPUT_HANDLER_DISABLED</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Указывает, что обработчик вывода выключен.
     Флаг устанавливается, когда обработчик вывода возвращает <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>
     или возникает ошибка при обработке буфера.
     До PHP 8.4.0 флаг разрешали устанавливать при запуске буфера вывода.
    </p>
   </dd>
  
  
   <dt id="constant.php-output-handler-processed">
    <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-processed">PHP_OUTPUT_HANDLER_PROCESSED</a></code></strong>
    (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <p class="para">
     Указывает, что обработчик вывода успешно обработал буфер.
     Флаг доступен с PHP 8.4.0.
    </p>
   </dd>
  
 </dl>
</div>
<?php manual_footer($setup); ?>