1--TEST-- 2mysql_get_server_info() 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7?> 8--FILE-- 9<?php 10include "connect.inc"; 11 12if (null !== ($tmp = @mysql_get_server_info(NULL))) 13 printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); 14 15require "table.inc"; 16if (!is_string($info = mysql_get_server_info($link)) || ('' === $info)) 17 printf("[003] Expecting string/any_non_empty, got %s/%s\n", gettype($info), $info); 18 19$def_info = mysql_get_server_info(); 20if ($def_info !== $info) { 21 printf("[004] Server info for the default link and the specified link differ, [%d] %s\n", 22 mysql_errno(), mysql_error()); 23 24 var_dump($def_info); 25 var_dump($info); 26} 27 28if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($info)) { 29 printf("[005] Expecting Unicode error message!\n"); 30 var_inspect($info); 31} 32 33if (NULL !== ($tmp = @mysql_get_server_info('too many', 'just too many'))) 34 printf("[006] Expecting NULL got %s/%s\n", gettype($tmp), $tmp); 35 36print "done!"; 37?> 38--EXPECTF-- 39done! 40