PHP 8.5.0 Alpha 1 available for testing

stream_get_filters

(PHP 5, PHP 7, PHP 8)

stream_get_filtersLista los filtros registrados

Descripción

stream_get_filters(): array

stream_get_filters() lee la lista de los filtros registrados.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

Devuelve un array indexado que contiene la lista de los filtros de flujo disponibles en el sistema.

Ejemplos

Ejemplo #1 Ejemplo con stream_get_filters()

<?php
$streamlist
= stream_get_filters();
print_r($streamlist);
?>

El resultado del ejemplo sería algo similar a:

Array (
  [0] => string.rot13
  [1] => string.toupper
  [2] => string.tolower
  [3] => string.base64
  [4] => string.quoted-printable
)

Ver también

add a note

User Contributed Notes 1 note

up
3
Jasper Bekkers
19 years ago
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 usage is:
<?php
$h
= fopen('gecodeerd.txt', 'r');
stream_filter_append($h, 'convert.base64-decode');
fpassthru($h);
fclose($h);
?>
Or
<?php
$filter
= 'convert.base64-decode';
$file = 'coded.txt';
$h = fopen('php://filter/read=' . $filter . '/resource=' . $file,'r');
fpassthru($h);
fclose($h);
?>
To Top