|
Appendix P. List of Available FiltersTable of Contents The following is a list of a few built-in stream filters for use with stream_filter_append(). Your version of PHP may have more filters (or fewer) than those listed here. It is worth noting a slight asymmetry between stream_filter_append() and stream_filter_prepend(). Every PHP stream contains a small read buffer where it stores blocks of data retrieved from the filesystem or other resource in order to process data in the most efficient manner. As soon as data is pulled from the resource into the stream's internal buffer, it is immediately processed through any attached filters whether the PHP application is actually ready for the data or not. If data is sitting in the read buffer when a filter is appended, this data will be immediately processed through that filter making the fact that it was sitting in the buffer seem transparent. However, if data is sitting in the read buffer when a filter is prepended, this data will NOT be processed through that filter. It will instead wait until the next block of data is retrieved from the resource. For a list of filters installed in your version of PHP use stream_get_filters(). Each of these filters does precisely what their name implies and correspond to the behavior of a built-in php string handling function. For more information on a given filter, refer to the manual page for the corresponding function.
Example P.1. string.rot13<?php
Example P.2. string.toupper<?php
Example P.3. string.tolower<?php
Example P.4. string.strip_tags<?php Related Examples ( Source code ) » filters Examples ( Source code ) » stream_get_filters |
Change LanguageHistory of PHP and related projects Migrating from PHP 5.1.x to PHP 5.2.x Migrating from PHP 5.0.x to PHP 5.1.x Migrating from PHP 4 to PHP 5 Migrating from PHP 3 to PHP 4 Migrating from PHP/FI 2 to PHP 3 Debugging PHP Configure options php.ini directives List of Supported Timezones Extension Categorization List of Function Aliases List of Reserved Words List of Resource Types List of Supported Protocols/Wrappers List of Available Filters List of Supported Socket Transports PHP type comparison tables List of Parser Tokens Userland Naming Guide |