--TEST-- mysqli_multi_query() --EXTENSIONS-- mysqli --SKIPIF-- --FILE-- $length) if ($length <= 0) printf("[017 - %d] Strange column lengths for column %d, got %d expecting any > 0\n", $res_num, $k, $length); } } if ($num_rows != 1) printf("[018 - %d] Expecting 1 row, got %d rows\n", $res_num, $num_rows); $res_num++; mysqli_free_result($res); } while (mysqli_next_result($link)); if ($res_num != 4) printf("[015] Expecting 3 result sets got %d result set[s]\n", $res_num); mysqli_close($link); try { mysqli_multi_query($link, "SELECT id, label FROM test"); } catch (Error $exception) { echo $exception->getMessage() . "\n"; } print "done!"; ?> --CLEAN-- --EXPECT-- [006] 3 [008] 0 [009] [2014] Commands out of sync; you can't run this command now [010] 7 mysqli object is already closed done!