File: constants.xml

package info (click to toggle)
php-doc 20250827~git.abe740d%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 71,968 kB
  • sloc: xml: 985,760; php: 25,504; javascript: 671; sh: 177; makefile: 37
file content (362 lines) | stat: -rw-r--r-- 9,768 bytes parent folder | download
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<appendix xml:id="errorfunc.constants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
 &reftitle.constants;
 &extension.constants.core;

 <simpara>
  The following constants (either the corresponding numerical value or their
  symbolic name) are used as a bitmask to specify which errors to report.
  It is possible to use
  <link linkend="language.operators.bitwise">bitwise operators</link>
  to combine these values or mask out certain types of errors.
 </simpara>

 <tip>
  <simpara>
   The name of the constants can be used within &php.ini;,
   instead of the raw numerical values to which they correspond to.
   However, only the
   <literal>|</literal>,
   <literal>~</literal>,
   <literal>^</literal>,
   <literal>!</literal>,
   <literal>&amp;</literal>
   operators are understood within &php.ini;.
  </simpara>
 </tip>

 <warning>
  <simpara>
   It is not possible to use the symbolic names outside of PHP.
   For example in &httpd.conf; the computed bitmask value must be used instead.
  </simpara>
 </warning>

 <variablelist xml:id="errorfunc.constants.errorlevels">
  <varlistentry xml:id="constant.e-error">
   <term>
    <constant>E_ERROR</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Fatal run-time errors.
     These indicate errors that can not be recovered from,
     such as a memory allocation problem.
     Execution of the script is halted.
    </simpara>
    <simpara>
     Value of the constant: <literal>1</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-warning">
   <term>
    <constant>E_WARNING</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Run-time warnings (non-fatal errors).
     Execution of the script is not halted.
    </simpara>
    <simpara>
     Value of the constant: <literal>2</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-parse">
   <term>
    <constant>E_PARSE</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Compile-time parse errors.
     Parse errors should only be generated by the parser.
    </simpara>
    <simpara>
     Value of the constant: <literal>4</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-notice">
   <term>
    <constant>E_NOTICE</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Run-time notices.
     Indicate that the script encountered something that could indicate an error,
     but could also happen in the normal course of running a script.
    </simpara>
    <simpara>
     Value of the constant: <literal>8</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-core-error">
   <term>
    <constant>E_CORE_ERROR</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Fatal errors that occur during PHP's initial startup.
     This is like an <constant>E_ERROR</constant>,
     except it is generated by the core of PHP.
    </simpara>
    <simpara>
     Value of the constant: <literal>16</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-core-warning">
   <term>
    <constant>E_CORE_WARNING</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Warnings (non-fatal errors) that occur during PHP's initial startup.
     This is like an <constant>E_WARNING</constant>,
     except it is generated by the core of PHP.
    </simpara>
    <simpara>
     Value of the constant: <literal>32</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-compile-error">
   <term>
    <constant>E_COMPILE_ERROR</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Fatal compile-time errors.
     This is like an <constant>E_ERROR</constant>,
     except it is generated by the Zend Scripting Engine.
    </simpara>
    <simpara>
     Value of the constant: <literal>64</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-compile-warning">
   <term>
    <constant>E_COMPILE_WARNING</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Compile-time warnings (non-fatal errors).
     This is like an <constant>E_WARNING</constant>,
     except it is generated by the Zend Scripting Engine.
    </simpara>
    <simpara>
     Value of the constant: <literal>128</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-deprecated">
   <term>
    <constant>E_DEPRECATED</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Run-time deprecation notices.
     Enable this to receive warnings about code
     that will not work in future versions.
    </simpara>
    <simpara>
     Value of the constant: <literal>8192</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-user-error">
   <term>
    <constant>E_USER_ERROR</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     User-generated error message.
     This is like an <constant>E_ERROR</constant>,
     except it is generated in PHP code by using the PHP function
     <function>trigger_error</function>.
    </simpara>
    <simpara>
     Value of the constant: <literal>256</literal>
    </simpara>
    <warning>
     <simpara>
      Usage of this constant with <function>trigger_error</function> is
      deprecated as of PHP 8.4.0.
      It is recommended to either &throw; an <exceptionname>Exception</exceptionname>
      or call <function>exit</function> instead.
     </simpara>
    </warning>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-user-warning">
   <term>
    <constant>E_USER_WARNING</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     User-generated warning message.
     This is like an <constant>E_WARNING</constant>,
     except it is generated in PHP code by using the PHP function
     <function>trigger_error</function>.
    </simpara>
    <simpara>
     Value of the constant: <literal>512</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-user-notice">
   <term>
    <constant>E_USER_NOTICE</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     User-generated notice message.
     This is like an <constant>E_NOTICE</constant>,
     except it is generated in PHP code by using the PHP function
     <function>trigger_error</function>.
    </simpara>
    <simpara>
     Value of the constant: <literal>1024</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-user-deprecated">
   <term>
    <constant>E_USER_DEPRECATED</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     User-generated deprecation message.
     This is like an <constant>E_DEPRECATED</constant>,
     except it is generated in PHP code by using the PHP function
     <function>trigger_error</function>.
    </simpara>
    <simpara>
     Value of the constant: <literal>16384</literal>
    </simpara>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-strict">
   <term>
    <constant>E_STRICT</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Run-time suggestions emitted by PHP about the executed code
     to ensure forward compatibility.
    </simpara>
    <simpara>
     Value of the constant: <literal>2048</literal>
    </simpara>
    <warning>
     <simpara>
      This error level is unused,
      and has been deprecated as of PHP 8.4.0.
     </simpara>
    </warning>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-recoverable-error">
   <term>
    <constant>E_RECOVERABLE_ERROR</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Legacy engine "exceptions" which correspond to catchable fatal error.
     Similar to <exceptionname>Error</exceptionname> but must be caught via a
     user defined error handler (see <function>set_error_handler</function>).
     If not handled, this behaves like <constant>E_ERROR</constant>.
    </simpara>
    <simpara>
     Value of the constant: <literal>4096</literal>
    </simpara>
    <note>
     <simpara>
      This error level is effectively unused,
      the only case where this can happen is when interpreting an
      &object; as a <type>bool</type> fails.
      This can only happen for internal objects.
     </simpara>
     <simpara>
      The most common example, prior to PHP 8.4.0, is using a
      <classname>GMP</classname> instance in a conditional.
     </simpara>
    </note>
   </listitem>
  </varlistentry>

  <varlistentry xml:id="constant.e-all">
   <term>
    <constant>E_ALL</constant>
    (<type>int</type>)
   </term>
   <listitem>
    <simpara>
     Bit-mask that contains every single error, warning, and notice.
    </simpara>
    <simpara>
     Value of the constant: <literal>30719</literal>
    </simpara>
    <warning>
     <simpara>
      Prior to PHP 8.4, the constant value was: <literal>32767</literal>
     </simpara>
    </warning>
   </listitem>
  </varlistentry>

 </variablelist>
</appendix>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->