1--TEST--
2mysqli_dump_debug_info()
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11    require_once("connect.inc");
12
13    $tmp	= NULL;
14    $link	= NULL;
15
16    if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket))
17        printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket);
18
19    if (!is_bool($tmp = $mysqli->dump_debug_info()))
20        printf("[003] Expecting boolean/[true|false] value, got %s/%s, [%d] %s\n",
21            gettype($tmp), $tmp,
22            $mysqli->errno, $mysqli->error);
23
24    $mysqli->close();
25
26    try {
27        $mysqli->dump_debug_info();
28    } catch (Error $exception) {
29        echo $exception->getMessage() . "\n";
30    }
31
32    print "done!";
33?>
34--EXPECT--
35mysqli object is already closed
36done!
37