<?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 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.mb-check-encoding.php',
    1 => 'mb_check_encoding',
    2 => 'Verifica si las cadenas son v&aacute;lidas para el encodage especificado',
  ),
  'up' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Funciones de strings multibyte',
  ),
  'prev' => 
  array (
    0 => 'ref.mbstring.php',
    1 => 'Funciones de strings multibyte',
  ),
  'next' => 
  array (
    0 => 'function.mb-chr.php',
    1 => 'mb_chr',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/mbstring/functions/mb-check-encoding.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.mb-check-encoding" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mb_check_encoding</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.4.3, PHP 5 &gt;= 5.1.3, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mb_check_encoding</span> &mdash; <span class="dc-title">Verifica si las cadenas son válidas para el encodage especificado</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.mb-check-encoding-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mb_check_encoding</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.null.php" class="type null">null</a></span></span> <code class="parameter">$value</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></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.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   Verifica si el flujo de octetos es válido para el encodage específico.
   Si <code class="parameter">value</code> es de tipo <span class="type"><a href="language.types.array.php" class="type array">array</a></span>, todas las claves y los valores son validados de manera recursiva.
   Es útil para prever lo que se conoce como « ataque por encodage inválido ».
  </p>
  <p class="para">
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.mb-check-encoding-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">value</code></dt>
     <dd>
      <p class="para">
       El flujo de octetos o <span class="type"><a href="language.types.array.php" class="type array">array</a></span> a verificar. Si es omitido, esta función verifica
       todas las entradas desde el inicio de la petición.
      </p>
     <div class="warning"><strong class="warning">Advertencia</strong>
      <p class="para">
        A partir de PHP 8.1.0, la omisión de este argumento o el paso de <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> está obsoleto.
      </p>
     </div>
     </dd>
    
    
     <dt><code class="parameter">encoding</code></dt>
     <dd>
      <p class="para">
       Encodage esperado.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.mb-check-encoding-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Esta función retorna <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> en caso de éxito o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si ocurre un error.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.mb-check-encoding-changelog">
  <h3 class="title">Historial de cambios</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Versión</th>
      <th>Descripción</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.1.0</td>
      <td>
        La llamada a esta función con <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> como <code class="parameter">value</code> o sin argumento está obsoleta.
      </td>
     </tr>

     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">value</code> y <code class="parameter">encoding</code> ahora son nullable.
      </td>
     </tr>

     <tr>
      <td>7.2.0</td>
      <td>
       Esta función ahora también acepta un <span class="type"><a href="language.types.array.php" class="type array">array</a></span> como valor de
       <code class="parameter">value</code>.
       Anteriormente, solo las <span class="type"><a href="language.types.string.php" class="type string">string</a></span> eran soportadas.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


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