1--TEST--
2function test: mysqli_error
3--EXTENSIONS--
4mysqli
5--SKIPIF--
6<?php
7require_once dirname(__DIR__) . "/test_setup/test_helpers.inc";
8mysqli_check_skip_test();
9?>
10--FILE--
11<?php
12require_once dirname(__DIR__) . "/test_setup/test_helpers.inc";
13
14/* Disable exceptions */
15mysqli_report(MYSQLI_REPORT_OFF);
16
17    $link = default_mysqli_connect();
18    $error = mysqli_error($link);
19    var_dump($error);
20
21    mysqli_query($link, "SELECT * FROM non_existing_table");
22    $error = mysqli_error($link);
23
24    var_dump($error);
25
26    mysqli_close($link);
27    print "done!";
28?>
29--EXPECTF--
30string(0) ""
31string(%d) "%s"
32done!
33