Like the string.* filters, the convert.* filters perform actions
similar to their names. The convert filters were added with
PHP 5.0.0.
For more information on a given filter, refer to the manual page for
the corresponding function.
convert.base64-encode and
convert.base64-decode
Use of these filters are equivalent to processing all stream data through
the base64_encode() and base64_decode()
functions respectively.
convert.base64-encode supports parameters given as
an associative array. If line-length is given, the
base64 output will be split into chunks of line-length
characters each. If line-break-chars is given, each
chunk will be delimited by the characters given. These parameters give the
same effect as using base64_encode() with
chunk_split().
Example M-5.
convert.base64-encode &
convert.base64-decode
<?php $fp = fopen('php://output', 'w'); stream_filter_append($fp, 'convert.base64-encode'); fwrite($fp, "This is a test.\n"); fclose($fp); /* Outputs: VGhpcyBpcyBhIHRlc3QuCg== */
$fp = fopen('php://output', 'w'); stream_filter_append($fp, 'convert.base64-decode'); fwrite($fp, "VGhpcyBpcyBhIHRlc3QuCg=="); fclose($fp); /* Outputs: This is a test. */ ?>
convert.quoted-printable-encode and
convert.quoted-printable-decode
Use of the decode version of this filter is equivalent to processing all stream
data through the quoted_printable_decode() functions.
There is no function equivalent to convert.quoted-printable-encode.
convert.quoted-printable-encode supports parameters given as
an associative array. In addition to the parameters supported by
convert.base64-encode, convert.quoted-printable-encode
also supports boolean arguments binary and
force-encode-first.
convert.base64-decode only supports the
line-break-chars parameter as a type-hint
for striping from the encoded payload.
Example M-6.
convert.quoted-printable-encode &
convert.quoted-printable-decode
<?php $fp = fopen('php://output', 'w'); stream_filter_append($fp, 'convert.quoted-printable-encode'); fwrite($fp, "This is a test.\n"); /* Outputs: =This is a test.=0A */ ?>
Php filters.convert Function syntax tag
filters.convert php code on this is provided for your study purpose, it will guide you to know how create and design a website using php. use it to practice and train your self online
Php filters.convert syntax tutorial
php tutorial guide and code design are for easy learning and programming. The code practice section provided at the top is for practising of this syntax. Use the code section up to practice your php programming online. Learning php is very easy, all you need is to use the examples on this site and practice them to perfect your skills.