reference/mysqli/mysqli_driver/report-mode.xml
c8ba91f7e546462dc66c2a11a7eab6f55c93915b
c8ba91f7e546462dc66c2a11a7eab6f55c93915b
...
...
@@ -11,11 +11,11 @@
11
11
&reftitle.description;
12
12
<para>&style.oop;</para>
13
13
<fieldsynopsis>
14
-
<type>int</type><varname linkend="mysqli-driver.report-mode">mysqli_driver->report_mode</varname>
14
+
<type>int</type><varname linkend="mysqli-driver.report-mode">mysqli_driver->report_mode</varname>
15
15
</fieldsynopsis>
16
16
<para>&style.procedural;</para>
17
17
<methodsynopsis>
18
-
<type>bool</type><methodname>mysqli_report</methodname>
18
+
<type>true</type><methodname>mysqli_report</methodname>
19
19
<methodparam><type>int</type><parameter>flags</parameter></methodparam>
20
20
</methodsynopsis>
21
21
<para>
...
...
@@ -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>
...
...
@@ -82,10 +83,33 @@
82
83
<refsect1 role="returnvalues">
83
84
&reftitle.returnvalues;
84
85
<para>
85
-
Returns &true;.
86
+
&return.true.always;
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 */
...
...
@@ -174,7 +199,6 @@ try {
174
199
</refsect1>
175
200
176
201
</refentry>
177
-
178
202
<!-- Keep this comment at the end of the file
179
203
Local variables:
180
204
mode: sgml
181
205