array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'pt_BR', ), 'this' => array ( 0 => 'function.stream-filter-remove.php', 1 => 'stream_filter_remove', ), 'up' => array ( 0 => 'ref.stream.php', 1 => 'Funções de Fluxo', ), 'prev' => array ( 0 => 'function.stream-filter-register.php', 1 => 'stream_filter_register', ), 'next' => array ( 0 => 'function.stream-get-contents.php', 1 => 'stream_get_contents', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'pt_BR', 'path' => 'reference/stream/functions/stream-filter-remove.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
stream_filter_remove — Remove um filtro de um fluxo
Remove um filtro de fluxo previamente adicionado a um fluxo com stream_filter_prepend() ou stream_filter_append(). Quaisquer dados remanescentes no buffer interno do filtro serão descarregados no filtro seguinte antes da remoção.
stream_filter
O filtro de fluxo a ser removido.
Exemplo #1 Refiltrando um fluxo dinamicamente
<?php
/* Abre um arquivo de teste para leitura e escrita */
$fp = fopen("test.txt", "rw");
$rot13_filter = stream_filter_append($fp, "string.rot13", STREAM_FILTER_WRITE);
fwrite($fp, "This is ");
stream_filter_remove($rot13_filter);
fwrite($fp, "a test\n");
rewind($fp);
fpassthru($fp);
fclose($fp);
?>
O exemplo acima produzirá:
Guvf vf a test