reference/mysqli/mysqli_driver/report-mode.xml
772cf37c3f2e1a1f4ba9fa552ac7fcfd78453f13
...
...
@@ -24,7 +24,8 @@
24
24
it will also inform about queries that don't use an index (or use a bad index).
25
25
</para>
26
26
<para>
27
-
The default setting is <constant>MYSQLI_REPORT_OFF</constant>.
27
+
As of PHP 8.1.0, the default setting is <literal>MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT</literal>.
28
+
Previously, it was <constant>MYSQLI_REPORT_OFF</constant>.
28
29
</para>
29
30
</refsect1>
30
31

...
...
@@ -48,7 +49,7 @@
48
49
<tbody>
49
50
<row>
50
51
<entry><constant>MYSQLI_REPORT_OFF</constant></entry>
51
-
<entry>Turns reporting off (the default)</entry>
52
+
<entry>Turns reporting off</entry>
52
53
</row>
53
54
<row>
54
55
<entry><constant>MYSQLI_REPORT_ERROR</constant></entry>
...
...
@@ -86,6 +87,29 @@
86
87
</para>
87
88
</refsect1>
88
89

90
+
<refsect1 role="changelog">
91
+
&reftitle.changelog;
92
+
<informaltable>
93
+
<tgroup cols="2">
94
+
<thead>
95
+
<row>
96
+
<entry>&Version;</entry>
97
+
<entry>&Description;</entry>
98
+
</row>
99
+
</thead>
100
+
<tbody>
101
+
<row>
102
+
<entry>8.1.0</entry>
103
+
<entry>
104
+
The default value is now <literal>MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT</literal>.
105
+
Previously, it was <constant>MYSQLI_REPORT_OFF</constant>.
106
+
</entry>
107
+
</row>
108
+
</tbody>
109
+
</tgroup>
110
+
</informaltable>
111
+
</refsect1>
112
+

89
113
<refsect1 role="examples">
90
114
&reftitle.examples;
91
115
<example>
...
...
@@ -123,6 +147,7 @@ try {
123
147
mysqli_report(MYSQLI_REPORT_ALL);
124
148

125
149
try {
150
+
/* if the connection fails, a mysqli_sql_exception will be thrown */
126
151
$link = mysqli_connect("localhost", "my_user", "my_password", "my_db");
127
152

128
153
/* this query should report an error */
129
154