1--TEST--
2mysqli_get_host_info()
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10    require_once("connect.inc");
11
12    require "table.inc";
13    if (!is_string($info = mysqli_get_host_info($link)) || ('' === $info))
14        printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info);
15
16    if ($IS_MYSQLND && $host != 'localhost' && $host != '127.0.0.1' && $port != '' && $host != "" && strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
17        /* this should be a TCP/IP connection and not a Unix Socket (or SHM or Named Pipe) */
18        if (!stristr($info, "TCP/IP"))
19            printf("[004] Should be a TCP/IP connection but mysqlnd says '%s'\n", $info);
20    }
21    print "done!";
22?>
23--CLEAN--
24<?php
25    require_once("clean_table.inc");
26?>
27--EXPECT--
28done!
29