--TEST-- mysqli_thread_id() --EXTENSIONS-- mysqli --SKIPIF-- --FILE-- real_query('KILL '.mysqli_thread_id($link)); // We kill our own connection so we should get "Query execution was interrupted" if ($link->errno !== 1317) printf("[042] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); mysqli_close($link); try { mysqli_thread_id($link); } catch (Error $exception) { echo $exception->getMessage() . "\n"; } print "done!"; ?> --EXPECT-- mysqli object is already closed done!