2 /* Prototype : bool stream_filter_remove(resource stream_filter)
3 * Description: Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource
4 * Source code: ext/standard/streamsfuncs.c
8 echo "*** Testing stream_filter_remove() : basic functionality ***\n";
10 $file = dirname( __FILE__
) . DIRECTORY_SEPARATOR
. 'streamfilterTest.txt';
13 $fp = fopen( $file, 'w+' );
15 $filter = stream_filter_append( $fp, "string.rot13", STREAM_FILTER_WRITE
);
16 fwrite( $fp, "Testing the rot13 filter which shifts some things around." );
18 var_dump( stream_filter_remove( $filter ) );
19 fwrite( $fp, "\nadd some more un-filtered foobar\n" );
28 $file = dirname( __FILE__
) . DIRECTORY_SEPARATOR
. 'streamfilterTest.txt';