PHP Function Iconv_Mime_Encode()
The php function iconv_mime_encode() is used to compose a MIME header field. This inbuilt function accepts three different parameters - $field_name, $field_value and $options. The function can be controlled by specifying an associative array of configuration items to the optional parameter options. The scheme specifies the method to encode a field value, the option may be either B (base64) or Q (quoted-printable) encoding scheme.
The second argument is the maximum length of a header line. The resulting MIME header is "folded" to a set of multiple lines in case the resulting field would be longer than the limit specified by this parameter.
Third argument is the MIME header type, the option may be one of ENT_COMPAT, ENT_HTML401 and ENT_XHTML5. It specifies how to convert special HTML entities like & and " into characters. The default value is ENT_COMPAT.
Fourth argument is the mb_internal_encoding, the character set in which the mb_string functions' internal encoding is presented. The mb_string functions' mb_encode_mime_header() and mb_encode_mime_value() accept input strings in this encoding.
PHP is a loosely-typed language, it does not force all arguments to be of the same data type as the function return value. Nevertheless, if you enable strict typing by adding a type declaration right before the opening curly brace of the function declaration, you'll get an error if an argument is not of the proper data type.