reference/mbstring/functions/mb-internal-encoding.xml
5b3fc18be040c1d552da1497415b20296163012f
...
...
@@ -9,8 +9,8 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>mixed</type><methodname>mb_internal_encoding</methodname>
13
-
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>mb_internal_encoding()</initializer></methodparam>
12
+
<type class="union"><type>string</type><type>bool</type></type><methodname>mb_internal_encoding</methodname>
13
+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>encoding</parameter><initializer>&null;</initializer></methodparam>
14
14
</methodsynopsis>
15
15
<para>
16
16
Set/Get the internal character encoding
...
...
@@ -48,6 +48,40 @@
48
48
</para>
49
49
</refsect1>
50
50

51
+
<refsect1 role="errors">
52
+
&reftitle.errors;
53
+
<para>
54
+
As of PHP 8.0.0, a <classname>ValueError</classname> is thrown if the
55
+
value of <parameter>encoding</parameter> is an invalid encoding.
56
+
Prior to PHP 8.0.0, a <constant>E_WARNING</constant> was emitted instead.
57
+
</para>
58
+
</refsect1>
59
+

60
+
<refsect1 role="changelog">
61
+
&reftitle.changelog;
62
+
<informaltable>
63
+
<tgroup cols="2">
64
+
<thead>
65
+
<row>
66
+
<entry>&Version;</entry>
67
+
<entry>&Description;</entry>
68
+
</row>
69
+
</thead>
70
+
<tbody>
71
+
&mbstring.changelog.encoding-nullable;
72
+
<row>
73
+
<entry>8.0.0</entry>
74
+
<entry>
75
+
Now throws a <classname>ValueError</classname> if
76
+
<parameter>encoding</parameter> is an invalid encoding.
77
+
Previously a <constant>E_WARNING</constant> was emitted instead.
78
+
</entry>
79
+
</row>
80
+
</tbody>
81
+
</tgroup>
82
+
</informaltable>
83
+
</refsect1>
84
+

51
85
<refsect1 role="examples">
52
86
&reftitle.examples;
53
87
<para>
...
...
@@ -88,7 +122,6 @@ echo mb_internal_encoding();
88
122
</refsect1>
89
123

90
124
</refentry>
91
-

92
125
<!-- Keep this comment at the end of the file
93
126
Local variables:
94
127
mode: sgml
95
128