<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.stream-filter-remove" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>stream_filter_remove</refname>
  <refpurpose>Remove a filter from a stream</refpurpose>
 </refnamediv>
 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>bool</type><methodname>stream_filter_remove</methodname>
   <methodparam><type>resource</type><parameter>stream_filter</parameter></methodparam>
  </methodsynopsis>
  <para>
   Removes a stream filter previously added to a stream with
   <function>stream_filter_prepend</function> or
   <function>stream_filter_append</function>.  Any data remaining in the
   filter's internal buffer will be flushed through to the next filter before
   removing it.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>stream_filter</parameter></term>
     <listitem>
      <para>
       The stream filter to be removed.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   &return.success;
  </para>
 </refsect1>

 <refsect1 role="examples">
  &reftitle.examples;
  <para>
   <example>
    <title>Dynamically refiltering a stream</title>
    <programlisting role="php">
<![CDATA[
<?php
/* Open a test file for reading and writing */
$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);

?>
]]>
    </programlisting>
    &example.outputs;
    <screen>
<![CDATA[
Guvf vf a test
]]>
    </screen>
   </example>
   
  </para>
 </refsect1>

 <refsect1 role="seealso">
  &reftitle.seealso;
  <para>
   <simplelist>
    <member><function>stream_filter_register</function></member>
    <member><function>stream_filter_append</function></member>
    <member><function>stream_filter_prepend</function></member>
   </simplelist>
  </para>
 </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
