<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/filters.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'filters.string.php',
    1 => 'Filtros de cadenas de caracteres',
    2 => 'Filtros de cadenas de caracteres',
  ),
  'up' => 
  array (
    0 => 'filters.php',
    1 => 'Lista de filtros est&aacute;ndar',
  ),
  'prev' => 
  array (
    0 => 'filters.php',
    1 => 'Lista de filtros est&aacute;ndar',
  ),
  'next' => 
  array (
    0 => 'filters.convert.php',
    1 => 'Filtros de conversi&oacute;n',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'appendices/filters.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="filters.string" class="section">
  <h2 class="title">Filtros de cadenas de caracteres</h2>

  <p class="simpara">
   Cada filtro hace lo que su nombre implica, y se refiere al
   comportamiento de la función PHP correspondiente. Para más detalles sobre un filtro, consulte el manual de la función
   de referencia.
  </p>

  <div class="section" id="filters.string.rot13">
   <h2 class="title">string.rot13</h2>
   <p class="simpara">
    El uso de este filtro es equivalente a tratar todos los datos
    del flujo a través de la función <span class="function"><a href="function.str-rot13.php" class="function">str_rot13()</a></span>.
   </p>
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 string.rot13</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://output'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">stream_filter_append</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">'string.rot13'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">"Ceci est un test.\n"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/* muestra :  Prpv rfg ha grfg.   */<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </div>

  <div class="section" id="filters.string.toupper">
   <h2 class="title">string.toupper</h2>
   <p class="simpara">
    El uso de este filtro es equivalente a tratar todos los datos
    del flujo a través de la función <span class="function"><a href="function.strtoupper.php" class="function">strtoupper()</a></span>.
   </p>
   <div class="example" id="example-2">
    <p><strong>Ejemplo #2 string.toupper</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://output'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">stream_filter_append</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">'string.toupper'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">"Ceci est un test.\n"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/* muestra :  CECI EST UN TEST.   */<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </div>

  <div class="section" id="filters.string.tolower">
   <h2 class="title">string.tolower</h2>
   <p class="simpara">
    El uso de este filtro es equivalente a tratar todos los datos
    del flujo a través de la función <span class="function"><a href="function.strtolower.php" class="function">strtolower()</a></span>.
   </p>
   <div class="example" id="example-3">
    <p><strong>Ejemplo #3 string.tolower</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://output'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">stream_filter_append</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">'string.tolower'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">"Ceci est un test.\n"</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/* muestra :  ceci est un test.   */<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </div>

  <div class="section" id="filters.string.strip_tags">
   <h2 class="title">string.strip_tags</h2>
   <p class="simpara">
    El uso de este filtro es equivalente a tratar todos los datos
    del flujo a través de la función <span class="function"><a href="function.strip-tags.php" class="function">strip_tags()</a></span>.
    El filtro acepta parámetros en dos formatos:
    O bien como una <span class="type"><a href="language.types.string.php" class="type string">string</a></span> que contiene una lista de etiquetas, similar al
    segundo parámetro de la función <span class="function"><a href="function.strip-tags.php" class="function">strip_tags()</a></span>,
    o bien como un <span class="type"><a href="language.types.array.php" class="type array">array</a></span> de nombres de etiquetas.
   </p>
   <div class="warning"><strong class="warning">Advertencia</strong><p class="simpara">
 Esta funcionalidad está <em>OBSOLETA</em> a partir de PHP 7.3.0.
 Depender de esta funcionalidad está altamente desaconsejado.
</p></div>
   <div class="example" id="example-4">
    <p><strong>Ejemplo #4 string.strip_tags</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://output'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">stream_filter_append</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">'string.strip_tags'</span><span style="color: #007700">, </span><span style="color: #0000BB">STREAM_FILTER_WRITE</span><span style="color: #007700">, </span><span style="color: #DD0000">"&lt;strong&gt;&lt;em&gt;&lt;span&gt;"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">"&lt;strong&gt;Ce texte en gras&lt;/strong&gt; finit par être agrandi &lt;h1&gt;en un titre 1&lt;/h1&gt;\n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/* muestra :  Ce texte en gras finit par être agrandi en un titre 1   */<br /><br /></span><span style="color: #0000BB">$fp </span><span style="color: #007700">= </span><span style="color: #0000BB">fopen</span><span style="color: #007700">(</span><span style="color: #DD0000">'php://output'</span><span style="color: #007700">, </span><span style="color: #DD0000">'w'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">stream_filter_append</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">'string.strip_tags'</span><span style="color: #007700">, </span><span style="color: #0000BB">STREAM_FILTER_WRITE</span><span style="color: #007700">, array(</span><span style="color: #DD0000">'strong'</span><span style="color: #007700">,</span><span style="color: #DD0000">'em'</span><span style="color: #007700">,</span><span style="color: #DD0000">'span'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">fwrite</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">, </span><span style="color: #DD0000">"&lt;strong&gt;Ce texte en gras&lt;/strong&gt; finit par être agrandi &lt;h1&gt;en un titre 1&lt;/h1&gt;\n"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">fclose</span><span style="color: #007700">(</span><span style="color: #0000BB">$fp</span><span style="color: #007700">);<br /></span><span style="color: #FF8000">/* muestra :  Ce texte en gras finit par être agrandi en un titre 1   */<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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