@@ -35,22 +35,25 @@ function mb_chr(int $codepoint, string $encoding = null): string
35
35
36
36
37
37
/**
38
- * Converts the character encoding of string
39
- * to to_encoding
40
- * from optionally from_encoding.
38
+ * Converts string from from_encoding,
39
+ * or the current internal encoding, to to_encoding.
41
40
* If string is an array, all its string values will be
42
41
* converted recursively.
43
42
*
44
- * @param string|array $string The string or array being encoded .
45
- * @param string $to_encoding The type of encoding that string is being converted to .
46
- * @param mixed $from_encoding Is specified by character code names before conversion. It is either
47
- * an array, or a comma separated enumerated list.
48
- * If from_encoding is not specified, the internal
49
- * encoding will be used .
43
+ * @param string|array $string The string or array to be converted .
44
+ * @param string $to_encoding The desired encoding of the result .
45
+ * @param mixed $from_encoding The current encoding used to interpret string.
46
+ * Multiple encodings may be specified as an array or comma separated
47
+ * list, in which case the correct encoding will be guessed using the
48
+ * same algorithm as mb_detect_encoding .
50
49
*
50
+ * If from_encoding is NULL or not specified, the
51
+ * mbstring.internal_encoding setting
52
+ * will be used if set, otherwise the default_charset setting.
51
53
*
52
- * See supported
53
- * encodings.
54
+ * See supported encodings
55
+ * for valid values of to_encoding
56
+ * and from_encoding.
54
57
* @return string|array The encoded string or array on success.
55
58
* @throws MbstringException
56
59
*
0 commit comments