<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.mbstring.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.mb-scrub.php',
    1 => 'mb_scrub',
    2 => 'Remplace les s&eacute;quences d\'octets mal form&eacute;es par le caract&egrave;re de substitution.',
  ),
  'up' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Fonctions sur les cha&icirc;nes de caract&egrave;res multioctets',
  ),
  'prev' => 
  array (
    0 => 'function.mb-rtrim.php',
    1 => 'mb_rtrim',
  ),
  'next' => 
  array (
    0 => 'function.mb-send-mail.php',
    1 => 'mb_send_mail',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/mbstring/functions/mb-scrub.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mb-scrub" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_scrub</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.2.0, PHP 8)</p><p class="refpurpose"><span class="refname">mb_scrub</span> &mdash; <span class="dc-title">Remplace les séquences d&#039;octets mal formées par le caractère de substitution.</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.mb-scrub-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mb_scrub</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.string.php" class="type string">string</a></span> <code class="parameter">$string</code></span>, <span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.string.php" class="type string">string</a></span></span> <code class="parameter">$encoding</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.string.php" class="type string">string</a></span></div>

  <p class="para rdfs-comment">
   Effectue une conversion de jeu de caractères depuis l&#039;encodage spécifié, ou depuis l&#039;encodage par défaut si aucun
   encodage n&#039;a été spécifié, vers le même encodage. Cela a pour effet de remplacer toute séquence d&#039;octets invalide
   par le caractère de substitution.   
  </p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-scrub-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <dl>
   
    <dt><code class="parameter">string</code></dt>
    <dd>
     <p class="para">
      La chaîne d&#039;entrée.    
     </p>
    </dd>
   
   
    <dt><code class="parameter">encoding</code></dt>
    <dd>
     <p class="para">
      L&#039;encodage utilisé pour interpréter <code class="parameter">string</code>.
      S&#039;il est omis ou <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, le
      paramètre <a href="mbstring.configuration.php#ini.mbstring.internal-encoding" class="link">mbstring.internal_encoding</a>
      sera utilisé s&#039;il est défini, sinon le paramètre <a href="ini.core.php#ini.default-charset" class="link">default_charset</a>
      sera utilisé. 
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mb-scrub-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Le résultat <a href="language.types.string.php" class="link">chaîne de caractères</a> avec les séquences d&#039;octets invalides remplacées. 
  </p>
 </div>


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

    </thead>

    <tbody class="tbody">
     <tr>
 <td>8.0.0</td>
 <td>
  <code class="parameter">encoding</code> est désormais nullable.
 </td>
</tr>

    </tbody>
   
  </table>

 </div>


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