|
stream_filter_registerRegister a user defined stream filter Description
bool stream_filter_register
( string
$filtername
, string $classname
)stream_filter_register allows you to implement your own filter on any registered stream used with all the other filesystem functions (such as fopen, fread etc.). Parameters
Return Values
Returns
stream_filter_register will return Examples
Example #1 Filter for capitalizing characters on foo-bar.txt stream The example below implements a filter named strtoupper on the foo-bar.txt stream which will capitalize all letter characters written to/read from that stream.
<?php The above example will output: LINE1 WORD - 2 EASY AS 123
Example #2 Registering a generic filter class to match multiple filter names.
<?php The above example will output: LINE1 WORD - 2 EASY AS 123 See Also
|