1--TEST-- 2Test stream_filter_remove() function : basic functionality 3--SKIPIF-- 4<?php 5$filters = stream_get_filters(); 6if(! in_array( "string.rot13", $filters )) die( "skip rot13 filter not available." ); 7?> 8--FILE-- 9<?php 10echo "*** Testing stream_filter_remove() : basic functionality ***\n"; 11 12$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTestBasics.txt'; 13touch( $file ); 14 15$fp = fopen( $file, 'w+' ); 16 17$filter = stream_filter_append( $fp, "string.rot13", STREAM_FILTER_WRITE ); 18fwrite( $fp, "Testing the rot13 filter which shifts some things around." ); 19 20var_dump( stream_filter_remove( $filter ) ); 21fwrite( $fp, "\nadd some more un-filtered foobar\n" ); 22 23rewind( $fp ); 24fpassthru( $fp ); 25fclose( $fp ); 26 27?> 28--CLEAN-- 29<?php 30$file = __DIR__ . DIRECTORY_SEPARATOR . 'streamfilterTestBasics.txt'; 31@unlink($file); 32?> 33--EXPECT-- 34*** Testing stream_filter_remove() : basic functionality *** 35bool(true) 36Grfgvat gur ebg13 svygre juvpu fuvsgf fbzr guvatf nebhaq. 37add some more un-filtered foobar 38