PHP stream_filter_append() Function
Example
Append a filter to a stream:
<?php
$f = fopen("test1.txt", "w");
//
Add "zlib.deflate" filter
stream_filter_append($f, "zlib.deflate");
fclose($f);
?>
Definition and Usage
The stream_filter_append() function appends a filter to a stream.
Syntax
stream_filter_append(stream, filter, rw, params)
Parameter Values
Parameter | Description |
---|---|
stream | Required. Specifies the target stream |
filter | Required. Specifies the filter name |
rw | Optional. |
params | Optional. |
Technical Details
Return Value: | A resource on success. FALSE on failure |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 5.1: Before this version, this function returned TRUE/FALSE |
❮ PHP Stream Reference