|
stream_filter_prepend
Attach a filter to a stream
(PHP 4 >= 4.3.0, PHP 5)
Adds filtername to the list of filters attached to stream. This filter will be added with the specified params to the beginning of the list and will therefore be called first during stream operations. To add a filter to the end of the list, use stream_filter_append().
By default, stream_filter_prepend() will
attach the filter to the
As of PHP 5.1.0, this function returns a resource which
can be used to refer to this filter instance during a call
to stream_filter_remove().
Prior to PHP 5.1.0, this function returns
When using custom (user) filters:
stream_filter_register() must be called first in order to register the desired user filter to filtername.
Note:
Stream data is read from resources (both local and remote) in chunks, with any unconsumed data kept in internal buffers. When a new filter is prepended to a stream, data in the internal buffers, which has already been processed through other filters will not be reprocessed through the new filter at that time. This differs from the behavior of stream_filter_append(). See also stream_filter_register(), and stream_filter_append(). |
Change Languagestream_bucket_append stream_bucket_make_writeable stream_bucket_new stream_bucket_prepend stream_context_create stream_context_get_default stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_encoding stream_filter_append stream_filter_prepend stream_filter_register stream_filter_remove stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_resolve_include_path stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_enable_crypto stream_socket_get_name stream_socket_pair stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_socket_shutdown stream_wrapper_register stream_wrapper_restore stream_wrapper_unregister |