<?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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.ob-get-clean.php',
    1 => 'ob_get_clean',
    2 => 'Obtient le contenu du tampon de sortie actif et d&eacute;sactive-le',
  ),
  'up' => 
  array (
    0 => 'ref.outcontrol.php',
    1 => 'Fonctions de bufferisation de sortie',
  ),
  'prev' => 
  array (
    0 => 'function.ob-flush.php',
    1 => 'ob_flush',
  ),
  'next' => 
  array (
    0 => 'function.ob-get-contents.php',
    1 => 'ob_get_contents',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/outcontrol/functions/ob-get-clean.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.ob-get-clean" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">ob_get_clean</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">ob_get_clean</span> &mdash; <span class="dc-title">Obtient le contenu du tampon de sortie actif et désactive-le</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.ob-get-clean-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>ob_get_clean</strong></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Cette fonction appelle le gestionnaire de sortie
   (avec les drapeaux <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-clean">PHP_OUTPUT_HANDLER_CLEAN</a></code></strong> et
   <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-final">PHP_OUTPUT_HANDLER_FINAL</a></code></strong>),
   ignore sa valeur de retour,
   retourne le contenu du tampon de sortie actif
   et désactive ce dernier.
  </p>
  <p class="para">
   <span class="function"><strong>ob_get_clean()</strong></span> échouera
   sans un tampon de sortie actif démarré avec le drapeau
   <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-removable">PHP_OUTPUT_HANDLER_REMOVABLE</a></code></strong>.
  </p>
  <p class="para">
   <span class="function"><strong>ob_get_clean()</strong></span>
   supprimera le contenu du tampon de sortie actif
   même s&#039;il a été démarré sans le drapeau
   <strong><code><a href="outcontrol.constants.php#constant.php-output-handler-cleanable">PHP_OUTPUT_HANDLER_CLEANABLE</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.ob-get-clean-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">Cette fonction ne contient aucun paramètre.</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.ob-get-clean-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Renvoie le contenu du tampon de sortie actif en cas de succès
   ou <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> en cas d&#039;échec.
  </p>
  <div class="caution"><strong class="caution">Attention</strong>
   <p class="simpara">
    <span class="function"><strong>ob_get_clean()</strong></span> renverra false
    mais ne générera pas de <strong><code><a href="errorfunc.constants.php#constant.e-notice">E_NOTICE</a></code></strong>
    s&#039;il n&#039;y a pas de tampon de sortie actif.
   </p>
  </div>
 </div>


 <div class="refsect1 errors" id="refsect1-function.ob-get-clean-errors">
  <h3 class="title">Erreurs / Exceptions</h3>
  <p class="para">
   Si la fonction échoue, elle génère une <strong><code><a href="errorfunc.constants.php#constant.e-notice">E_NOTICE</a></code></strong>.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.ob-get-clean-examples">
  <h3 class="title">Exemples</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Exemple #1 Exemple avec <span class="function"><strong>ob_get_clean()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br />ob_start</span><span style="color: #007700">();<br /><br />echo </span><span style="color: #DD0000">"Bonjour le monde !"</span><span style="color: #007700">;<br /><br /></span><span style="color: #0000BB">$out </span><span style="color: #007700">= </span><span style="color: #0000BB">ob_get_clean</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$out </span><span style="color: #007700">= </span><span style="color: #0000BB">strtolower</span><span style="color: #007700">(</span><span style="color: #0000BB">$out</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$out</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>L&#039;exemple ci-dessus va afficher :</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(18) &quot;bonjour le monde !&quot;</pre>
</div>
    </div>
   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.ob-get-clean-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.ob-start.php" class="function" rel="rdfs-seeAlso">ob_start()</a> - Enclenche la temporisation de sortie</span></li>
    <li><span class="function"><a href="function.ob-get-contents.php" class="function" rel="rdfs-seeAlso">ob_get_contents()</a> - Retourne le contenu du tampon de sortie</span></li>
    <li><span class="function"><a href="function.ob-clean.php" class="function" rel="rdfs-seeAlso">ob_clean()</a> - Nettoyer (effacer) le contenu du tampon de sortie actif.</span></li>
    <li><span class="function"><a href="function.ob-end-clean.php" class="function" rel="rdfs-seeAlso">ob_end_clean()</a> - Effacez (nettoyez) le contenu du tampon de sortie actif et d&eacute;sactivez-le.</span></li>
    <li><span class="function"><a href="function.ob-get-flush.php" class="function" rel="rdfs-seeAlso">ob_get_flush()</a> - Vide (envoie) la valeur de retour du gestionnaire de sortie actif,
   renvoie le contenu du tampon de sortie actif et le d&eacute;sactive.</span></li>
   </ul>
  </p>
 </div>


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