Skip to content

Commit aa79a14

Browse files
Fix doc of mysqli_get_charset (#5411)
1 parent 63bd68a commit aa79a14

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

reference/mysqli/mysqli/get-charset.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
</varlistentry>
5252
<varlistentry>
5353
<term><parameter>dir</parameter></term>
54-
<listitem><para>Directory the charset description was fetched from (?) or "" for built-in character sets</para></listitem>
54+
<listitem><para>Directory the character set description was fetched from or "" for built-in character sets</para></listitem>
5555
</varlistentry>
5656
<varlistentry>
5757
<term><parameter>min_length</parameter></term>
@@ -67,7 +67,7 @@
6767
</varlistentry>
6868
<varlistentry>
6969
<term><parameter>state</parameter></term>
70-
<listitem><para>Character set status (?)</para></listitem>
70+
<listitem><para>As of PHP 8.2.0, it is always <literal>1</literal></para></listitem>
7171
</varlistentry>
7272
</variablelist>
7373
</para>
@@ -83,6 +83,7 @@
8383
<?php
8484
$db = mysqli_init();
8585
$db->real_connect("localhost","root","","test");
86+
$db->set_charset('latin1');
8687
var_dump($db->get_charset());
8788
?>
8889
]]>
@@ -93,6 +94,7 @@
9394
<?php
9495
$db = mysqli_init();
9596
mysqli_real_connect($db, "localhost","root","","test");
97+
mysqli_set_charset($db, 'latin1');
9698
var_dump(mysqli_get_charset($db));
9799
?>
98100
]]>
@@ -114,7 +116,7 @@ object(stdClass)#2 (7) {
114116
["number"]=>
115117
int(8)
116118
["state"]=>
117-
int(801)
119+
int(1)
118120
}
119121
]]>
120122
</screen>

0 commit comments

Comments
 (0)