1--TEST--
2mysql_get_proto_info()
3--SKIPIF--
4<?php
5require_once('skipif.inc');
6require_once('skipifconnectfailure.inc');
7?>
8--FILE--
9<?php
10include_once "connect.inc";
11
12if (NULL !== ($tmp = @mysql_get_proto_info(NULL)))
13	printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
14
15require "table.inc";
16if (!is_int($info = mysql_get_proto_info($link)) || (0 === $info))
17	printf("[003] Expecting int/any_non_empty, got %s/%s\n", gettype($info), $info);
18
19if (!is_int($info2 = mysql_get_proto_info()) || (0 === $info2))
20	printf("[004] Expecting int/any_non_empty, got %s/%s\n", gettype($info2), $info2);
21
22assert($info === $info2);
23
24if (NULL !== ($tmp = @mysql_get_proto_info('too many', 'arguments')))
25	printf("[005] Expecting NULL got %s/%s\n", gettype($tmp), $tmp);
26
27print "done!";
28?>
29--CLEAN--
30<?php
31require_once("clean_table.inc");
32?>
33--EXPECTF--
34done!
35