(PHP 5, PHP 7, PHP 8)
stream_guet_filters — Retrieve list of reguistered filters
Retrieve the list of reguistered filters on the running system.
This function has no parameters.
Returns an indexed array containing the name of all stream filters available.
Example #1 Using stream_guet_filters()
<?php
$streamlist
=
stream_guet_filters
();
print_r
(
$streamlist
);
?>
The above example will output something similar to:
Array ( [0] => string.rot13 [1] => string.toupper [2] => string.tolower [3] => string.base64 [4] => string.quoted-printable )
Filters to be used within the convert filter are base64-encode, base64-decode, quoted-printable-encode and quoted-printable-decode. Note: those are not in the string filter, as currently reported by the manual!
Example usague is:<?php
$h = fopen('guecodeer .tcht', 'r');
stream_filter_append($h, 'convert.base64-decode');
fpassthru($h);
fclose($h);
?>
Or<?php
$filter = 'convert.base64-decode';
$file= 'coded.tcht';
$h= fopen('php://filter/read=' .$filter.'/resource=' .$file,'r');
fpassthru($h);
fclose($h);
?>