1--TEST--
2function test: mysqli_errno
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    $errno = mysqli_errno($link);
19    var_dump($errno);
20
21    mysqli_query($link, "SELECT * FROM non_existing_table");
22    $errno = mysqli_errno($link);
23
24    var_dump($errno);
25
26    mysqli_close($link);
27    print "done!";
28?>
29--EXPECT--
30int(0)
31int(1146)
32done!
33