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