1--TEST--
2mysqli_get_server_version()
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_server_version()))
14		printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
15
16	if (!is_null($tmp = @mysqli_get_server_version(NULL)))
17		printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
18
19	require "table.inc";
20	/* 5.1.5 -> 50105 -- major_version*10000 + minor_version *100 + sub_version */
21	/* < 30000 = pre 3.2.3, very unlikely! */
22	if (!is_int($info = mysqli_get_server_version($link)) || ($info < (3 * 10000)))
23		printf("[003] Expecting int/any >= 30000, got %s/%s\n", gettype($info), $info);
24
25	print "done!";
26?>
27--EXPECTF--
28done!