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