<?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 => 'en',
  ),
  'this' => 
  array (
    0 => 'function.flush.php',
    1 => 'flush',
    2 => 'Flush system output buffer',
  ),
  'up' => 
  array (
    0 => 'ref.outcontrol.php',
    1 => 'Output Control Functions',
  ),
  'prev' => 
  array (
    0 => 'ref.outcontrol.php',
    1 => 'Output Control Functions',
  ),
  'next' => 
  array (
    0 => 'function.ob-clean.php',
    1 => 'ob_clean',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/outcontrol/functions/flush.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.flush" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">flush</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">flush</span> &mdash; <span class="dc-title">Flush system output buffer</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.flush-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>flush</strong></span>(): <span class="type"><a href="language.types.void.php" class="type void">void</a></span></div>

  <p class="para rdfs-comment">
   Flushes the system write buffers of PHP and the backend used by PHP
   (e.g.: CGI, a web server).
   In a command line environment <span class="function"><strong>flush()</strong></span>
   will attempt to flush the contents of the buffers only
   whereas in a web context headers and the contents of the buffers are flushed.
  </p>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    <span class="function"><strong>flush()</strong></span> may not be able to override
    the buffering scheme of the web server
    and it has no effect on any client-side buffering in the browser.
   </span>
  </p></blockquote>
  <blockquote class="note"><p><strong class="note">Note</strong>: 
   <span class="simpara">
    This function does not have any effect on user level output handlers
    such as those started by <span class="function"><a href="function.ob-start.php" class="function">ob_start()</a></span>
    or <span class="function"><a href="function.output-add-rewrite-var.php" class="function">output_add_rewrite_var()</a></span>.
   </span>
  </p></blockquote>
  <div class="warning"><strong class="warning">Warning</strong>
   <p class="simpara">
    <span class="function"><strong>flush()</strong></span> can interfere with output handlers
    that set and send headers in a web context (e.g. <span class="function"><a href="function.ob-gzhandler.php" class="function">ob_gzhandler()</a></span>)
    by sending headers before these handlers can do so.
   </p>
  </div>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.flush-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">This function has no parameters.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.flush-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   No value is returned.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.flush-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       Flushing headers without a body will now succeed in FastCGI.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.flush-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ob-flush.php" class="function" rel="rdfs-seeAlso">ob_flush()</a> - Flush (send) the return value of the active output handler</span></li>
    <li><span class="function"><a href="function.ob-clean.php" class="function" rel="rdfs-seeAlso">ob_clean()</a> - Clean (erase) the contents of the active output buffer</span></li>
    <li><span class="function"><a href="function.ob-end-flush.php" class="function" rel="rdfs-seeAlso">ob_end_flush()</a> - Flush (send) the return value of the active output handler
   and turn the active output buffer off</span></li>
    <li><span class="function"><a href="function.ob-end-clean.php" class="function" rel="rdfs-seeAlso">ob_end_clean()</a> - Clean (erase) the contents of the active output buffer and turn it off</span></li>
   </ul>
  </p>
 </div>


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