what is the syntax of the stream_filter_append() function in php?
stream_filter_append(stream, filter, rw, params)
Parameter | Description |
---|---|
stream | Required. Specifies the target stream |
filter | Required. Specifies the filter name |
rw | Optional. |
params | Optional. |
examples of the STREAM_FILTER_APPEND() function
Example 1. In this example, we append a filter to a stream.
<?php
$f = fopen("test1.txt", "w");
// Add "zlib.deflate" filter
stream_filter_append($f, "zlib.deflate");
fclose($f);
?>