Friday, February 1, 2008

PHP HIDDEN FUNCTIONS

String Functions:
==============
1. stream_filter_append:
~~~~~~~~~~~~~~~~
syntax:
resource stream_filter_append ( resource stream, string filtername [, int read_write [, mixed params]] )

desc:
Attach a filter to a stream for example u want to write the content inside one file under some filter condition (only lowercase /upper case/strip tags )

ex:

$fp = fopen('php://output', 'w');
stream_filter_append($fp, 'string.toupper');
fwrite($fp, "This is a test.\n");
/* Outputs: THIS IS A TEST. */
//stream_filter_append($fp, 'string.toupper');
//stream_filter_append($fp, 'string.tolower');

=========================================================

No comments: