mb_encoding_aliases
Get an alias for known encoding types
Function name: mb_encoding_aliases()
Function Description: The mb_encoding_aliases() function returns an array containing all aliases for the specified character encoding.
Parameters: None
Return value: an array containing all aliases, and if there is no alias, an empty array is returned.
Example:
// 获取UTF-8 编码的所有别名$aliases = mb_encoding_aliases('UTF-8'); print_r($aliases);
Output result:
Array ( [0] => UTF-8 [1] => utf8 [2] => ucs-2 [3] => ucs-2be [4] => ucs-2le [5] => ucs-4 [6] => ucs-4be [7] => ucs-4le [8] => utf-16 [9] => utf-16be [10] => utf-16le [11] => utf-32 [12] => utf-32be [13] => utf-32le [14] => UNICODE-1-1 [15] => UNICODEBIG [16] => UTF-16 [17] => UTF-16BE [18] => UTF-16LE [19] => UTF-32 [20] => UTF-32BE [21] => UTF-32LE [22] => UTF8 [23] => UNICODE [24] => UNICODEBIGENDIAN )
Description: The above example demonstrates how to use the mb_encoding_aliases() function to get all aliases that are encoded by UTF-8. The output shows all aliases encoded by UTF-8, including aliases with and without scribing.