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