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