The php Function Stream_Filter_Remove Removes a Stream Filter
The php function stream_filter_remove removes a filter that was previously appended to a stream with either the stream_filter_append() or stream_filter_prepend(). Any data remaining in the filter's internal buffer will be flushed through to the next filter before it is removed from the stream. This function should only be called from within the class that implements the filter.
A wrapper is additional code that tells the stream how to handle specific protocols/encodings. Many wrappers are built into PHP by default (see Appendix L), and users may design their own wrappers to meet their requirements using the class stream_wrapper_register(), or directly from an extension with the API Reference in Chapter 44.
A filter is a set of functions that transforms or processes incoming data from a stream. Using a filter to transform or process data is more efficient than processing the same amount of data twice, because it only needs to be done once, and the results are cached in memory.
There are a number of predefined filters built into PHP, including the obfuscate filter that obfuscates all text passed to it, the zip filter that compresses data into an archive, and the hex_encode_first filter which forcibly hex-encodes the first character on every line. A complete list of built-in filters is available at the documentation page for the class stream_filter_register().
During a read or write operation, the order in which filters are applied to a stream is important. If a filter is added with stream_filter_append(), the filter will be applied to the data before it is written, but if it is added with stream_filter_prepend(), the filter will be applied to the unprocessed data before it is written.