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