1--TEST-- 2mysqli_thread_id() 3--SKIPIF-- 4<?php 5require_once('skipif.inc'); 6require_once('skipifconnectfailure.inc'); 7?> 8--FILE-- 9<?php 10 require_once("connect.inc"); 11 12 require('table.inc'); 13 14 if (!is_int($tmp = mysqli_thread_id($link)) || (0 === $tmp)) 15 printf("[003] Expecting int/any but zero, got %s/%s. [%d] %s\n", 16 gettype($tmp), $tmp, mysqli_errno($link), mysqli_error($link)); 17 18 // should work if the thread id is correct 19 mysqli_kill($link, mysqli_thread_id($link)); 20 21 mysqli_close($link); 22 23 try { 24 mysqli_thread_id($link); 25 } catch (Error $exception) { 26 echo $exception->getMessage() . "\n"; 27 } 28 29 print "done!"; 30?> 31--CLEAN-- 32<?php 33 require_once("clean_table.inc"); 34?> 35--EXPECT-- 36mysqli object is already closed 37done! 38