]> granicus.if.org Git - php/commit
Implement filter API for streams.
authorWez Furlong <wez@php.net>
Tue, 20 Aug 2002 20:47:47 +0000 (20:47 +0000)
committerWez Furlong <wez@php.net>
Tue, 20 Aug 2002 20:47:47 +0000 (20:47 +0000)
commit9d348ea80059301a099b8f3dce25429c0760666d
tree8e4154dca38d70d9b4ddf5485fd3055837634e21
parenta9ba30cd89b8065d1938a9e02c7ba373f2934180
Implement filter API for streams.

Filters can be stacked onto a stream; more details will follow in docs and
on php-dev.

Implement "string.rot13" filter

Allows the following script:

$fp = fopen("file.txt", "r");
stream_filter_prepend($fp, "string.rot13");

// File contents will be subject to a rot13 transformation before
// being output.
fpassthru($fp);
fclose($fp);
ext/standard/basic_functions.c
ext/standard/file.c
ext/standard/file.h
ext/standard/php_string.h
ext/standard/string.c
main/php_streams.h
main/streams.c