Menu Riverview Church

STREAM_FILTER_REGISTER

Register a user defined stream filter

SYNTAX

stream_filter_register ( string $filtername , string $classname ) : bool

PARAMETERS

filtername

The filter name to be registered.

classname

To implement a filter, you need to define a class as an extension of php_user_filter with a number of member functions. When performing read/write operations on the stream to which your filter is attached, PHP will pass the data through your filter (and any other filters attached to that stream) so that the data may be modified as desired. You must implement the methods exactly as described in php_user_filter - doing otherwise will lead to undefined behaviour.

RETURN

Returns TRUE on success or FALSE on failure.

stream_filter_register() will return FALSE if the filtername is already defined.

EXAMPLES

1

CASE

2

CASE
case

PHP