PHP 8.0.24 Released!

mysqli_report

(PHP 5, PHP 7, PHP 8)

mysqli_reportAlias of mysqli_driver->report_mode

Description

This function is an alias of: mysqli_driver->report_mode

add a note

User Contributed Notes 3 notes

up
0
sethVoid@thevoid
20 days ago
If you use your own DBException handling for example

<?php
if (!@real_connect(HOST, USERNAME, PASSWORD, NAME, PORT))
{
    throw new
DBException(connect_errno);
}
?>

Then turn off errors like this for php 8 >

<?php
    mysqli_report
(MYSQLI_REPORT_OFF);
?>
up
0
grepmaster
13 years ago
Hint: If you use

mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT)

normal errors are generated instead of exceptions.
up
-3
Polarina
14 years ago
It should be noted that all reports made by this function, are sent through an exception named 'mysqli_sql_exception' instead of a normal PHP warning.
To Top