xref: /PHP-8.1/ext/mysqli/tests/mysqli_stat.phpt (revision b5a14e6c)
1--TEST--
2mysqli_stat()
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once('skipifconnectfailure.inc');
8?>
9--FILE--
10<?php
11    require_once("connect.inc");
12
13    require('table.inc');
14
15    if ((!is_string($tmp = mysqli_stat($link))) || ('' === $tmp))
16        printf("[004] Expecting non empty string, got %s/'%s', [%d] %s\n",
17            gettype($tmp), $tmp, mysqli_errno($link), mysql_error($link));
18
19    mysqli_close($link);
20
21    try {
22        mysqli_stat($link);
23    } catch (Error $exception) {
24        echo $exception->getMessage() . "\n";
25    }
26
27    print "done!";
28?>
29--EXPECT--
30mysqli object is already closed
31done!
32