--TEST-- mysqli_get_charset() --SKIPIF-- --FILE-- charset) || !in_array(gettype($charset->charset), array("string", "unicode")) || ($character_set_connection !== $charset->charset)) printf("[016] Expecting string/%s, got %s/%s\n", $character_set_connection, gettype($charset->charset), $charset->charset); if (!isset($charset->collation) || !in_array(gettype($charset->collation), array("string", "unicode")) || ($collation_connection !== $charset->collation)) printf("[017] Expecting string/%s, got %s/%s\n", $collation_connection, gettype($charset->collation), $charset->collation); if (!isset($charset->dir) || !is_string($charset->dir)) printf("[019] Expecting string - ideally %s*, got %s/%s\n", $character_sets_dir, gettype($charset->dir), $charset->dir); if (!isset($charset->min_length) || !(is_int($charset->min_length)) || ($charset->min_length < 0) || ($charset->min_length > $charset->max_length)) printf("[020] Expecting int between 0 ... %d, got %s/%s\n", $charset->max_length, gettype($charset->min_length), $charset->min_length); if (!isset($charset->number) || !is_int($charset->number) || ($charset->number !== (int)$id)) printf("[021] Expecting int/%d, got %s/%s\n", $id, gettype($charset->number), $charset->number); if (!isset($charset->state) || !is_int($charset->state)) printf("[022] Expecting int/any, got %s/%s\n", gettype($charset->state), $charset->state); mysqli_close($link); if (false !== ($tmp = mysqli_get_charset($link))) printf("[023] Expecting false, got %s/%s\n", gettype($tmp), $tmp); print "done!"; ?> --CLEAN-- --EXPECTF-- Warning: mysqli_get_charset(): Couldn't fetch mysqli in %s on line %d done!