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 if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { 13 printf("[003] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", 14 $host, $user, $db, $port, $socket); 15 exit(1); 16 } 17 18 if (!is_bool($tmp = mysqli_dump_debug_info($link))) 19 printf("[004] Expecting boolean/[true|false] value, got %s/%s, [%d] %s\n", 20 gettype($tmp), $tmp, 21 mysqli_errno($link), mysqli_error($link)); 22 23 mysqli_close($link); 24 25 try { 26 mysqli_dump_debug_info($link); 27 } catch (Error $exception) { 28 echo $exception->getMessage() . "\n"; 29 } 30 31 print "done!"; 32?> 33--EXPECT-- 34mysqli object is already closed 35done! 36