blob: 8345b4b82f881842fd58f62dd464e9fbd100b34d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--TEST--
Bug #37090 (mysqli_set_charset return code)
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
if (!function_exists('mysqli_set_charset')) {
die('skip mysqli_set_charset() not available');
}
?>
--FILE--
<?php
require_once("connect.inc");
$mysql = new my_mysqli($host, $user, $passwd, $db, $port, $socket);
$cs = array();
$cs[] = $mysql->set_charset("latin1");
$cs[] = $mysql->character_set_name();
$cs[] = $mysql->set_charset("utf8");
$cs[] = $mysql->character_set_name();
$cs[] = $mysql->set_charset("notdefined");
$cs[] = $mysql->character_set_name();
var_dump($cs);
print "done!";
?>
--EXPECT--
array(6) {
[0]=>
bool(true)
[1]=>
string(6) "latin1"
[2]=>
bool(true)
[3]=>
string(4) "utf8"
[4]=>
bool(false)
[5]=>
string(4) "utf8"
}
done!
|