1--TEST--
2final public int ErrorException::getSeverity ( void );
3--CREDITS--
4marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
5--INI--
6error_reporting = E_ALL
7--FILE--
8<?php
9
10const EXCEPTION_CODE_ERROR = 0;
11const EXCEPTION_SEVERITY_ERROR_MSG = "This exception severity is: ";
12const EXCEPTION_PARAM_MSG = "string message param";
13const EXCEPTION_TRACE_AS_STRING_MSG = "#0 {main}";
14
15try {
16    throw new ErrorException();
17} catch(ErrorException $e) {
18    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
19    var_dump($e->getSeverity() === E_ERROR);
20    var_dump($e->getMessage() === "");
21    var_dump($e->getCode() === 0);
22    var_dump($e->getPrevious() === NULL);
23    var_dump($e->getFile() === __FILE__);
24    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
25}
26
27try {
28    throw new ErrorException(EXCEPTION_PARAM_MSG);
29} catch(ErrorException $e) {
30    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
31    var_dump($e->getSeverity() === E_ERROR);
32    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
33    var_dump($e->getCode() === 0);
34    var_dump($e->getPrevious() === NULL);
35    var_dump($e->getFile() === __FILE__);
36    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
37}
38
39try {
40    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR);
41} catch(ErrorException $e) {
42    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
43    var_dump($e->getSeverity() === E_ERROR);
44    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
45    var_dump($e->getCode() === 0);
46    var_dump($e->getPrevious() === NULL);
47    var_dump($e->getFile() === __FILE__);
48    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
49}
50
51try {
52    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_ERROR);
53} catch(ErrorException $e) {
54    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
55    var_dump($e->getSeverity() === E_ERROR);
56    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
57    var_dump($e->getCode() === 0);
58    var_dump($e->getPrevious() === NULL);
59    var_dump($e->getFile() === __FILE__);
60    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
61}
62
63try {
64    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_WARNING);
65} catch(ErrorException $e) {
66    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
67    var_dump($e->getSeverity() === E_WARNING);
68    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
69    var_dump($e->getCode() === 0);
70    var_dump($e->getPrevious() === NULL);
71    var_dump($e->getFile() === __FILE__);
72    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
73}
74
75try {
76    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_PARSE);
77} catch(ErrorException $e) {
78    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
79    var_dump($e->getSeverity() === E_PARSE);
80    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
81    var_dump($e->getCode() === 0);
82    var_dump($e->getPrevious() === NULL);
83    var_dump($e->getFile() === __FILE__);
84    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
85}
86
87try {
88    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_NOTICE);
89} catch(ErrorException $e) {
90    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
91    var_dump($e->getSeverity() === E_NOTICE);
92    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
93    var_dump($e->getCode() === 0);
94    var_dump($e->getPrevious() === NULL);
95    var_dump($e->getFile() === __FILE__);
96    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
97}
98
99try {
100    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_ERROR);
101} catch(ErrorException $e) {
102    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
103    var_dump($e->getSeverity() === E_CORE_ERROR);
104    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
105    var_dump($e->getCode() === 0);
106    var_dump($e->getPrevious() === NULL);
107    var_dump($e->getFile() === __FILE__);
108    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
109}
110
111try {
112    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING);
113} catch(ErrorException $e) {
114    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
115    var_dump($e->getSeverity() === E_CORE_WARNING);
116    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
117    var_dump($e->getCode() === 0);
118    var_dump($e->getPrevious() === NULL);
119    var_dump($e->getFile() === __FILE__);
120    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
121}
122
123try {
124    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING);
125} catch(ErrorException $e) {
126    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
127    var_dump($e->getSeverity() === E_CORE_WARNING);
128    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
129    var_dump($e->getCode() === 0);
130    var_dump($e->getPrevious() === NULL);
131    var_dump($e->getFile() === __FILE__);
132    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
133}
134
135try {
136    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_ERROR);
137} catch(ErrorException $e) {
138    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
139    var_dump($e->getSeverity() === E_COMPILE_ERROR);
140    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
141    var_dump($e->getCode() === 0);
142    var_dump($e->getPrevious() === NULL);
143    var_dump($e->getFile() === __FILE__);
144    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
145}
146
147try {
148    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_WARNING);
149} catch(ErrorException $e) {
150    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
151    var_dump($e->getSeverity() === E_COMPILE_WARNING);
152    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
153    var_dump($e->getCode() === 0);
154    var_dump($e->getPrevious() === NULL);
155    var_dump($e->getFile() === __FILE__);
156    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
157}
158
159try {
160    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_ERROR);
161} catch(ErrorException $e) {
162    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
163    var_dump($e->getSeverity() === E_USER_ERROR);
164    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
165    var_dump($e->getCode() === 0);
166    var_dump($e->getPrevious() === NULL);
167    var_dump($e->getFile() === __FILE__);
168    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
169}
170
171try {
172    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_WARNING);
173} catch(ErrorException $e) {
174    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
175    var_dump($e->getSeverity() === E_USER_WARNING);
176    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
177    var_dump($e->getCode() === 0);
178    var_dump($e->getPrevious() === NULL);
179    var_dump($e->getFile() === __FILE__);
180    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
181}
182
183try {
184    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_NOTICE);
185} catch(ErrorException $e) {
186    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
187    var_dump($e->getSeverity() === E_USER_NOTICE);
188    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
189    var_dump($e->getCode() === 0);
190    var_dump($e->getPrevious() === NULL);
191    var_dump($e->getFile() === __FILE__);
192    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
193}
194
195try {
196    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT);
197} catch(ErrorException $e) {
198    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
199    var_dump($e->getSeverity() === E_STRICT);
200    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
201    var_dump($e->getCode() === 0);
202    var_dump($e->getPrevious() === NULL);
203    var_dump($e->getFile() === __FILE__);
204    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
205}
206
207try {
208    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR);
209} catch(ErrorException $e) {
210    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
211    var_dump($e->getSeverity() === E_RECOVERABLE_ERROR);
212    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
213    var_dump($e->getCode() === 0);
214    var_dump($e->getPrevious() === NULL);
215    var_dump($e->getFile() === __FILE__);
216    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
217}
218
219try {
220    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_DEPRECATED);
221} catch(ErrorException $e) {
222    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
223    var_dump($e->getSeverity() === E_DEPRECATED);
224    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
225    var_dump($e->getCode() === 0);
226    var_dump($e->getPrevious() === NULL);
227    var_dump($e->getFile() === __FILE__);
228    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
229}
230
231try {
232    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_DEPRECATED);
233} catch(ErrorException $e) {
234    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
235    var_dump($e->getSeverity() === E_USER_DEPRECATED);
236    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
237    var_dump($e->getCode() === 0);
238    var_dump($e->getPrevious() === NULL);
239    var_dump($e->getFile() === __FILE__);
240    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
241}
242
243try {
244    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_ERROR, __FILE__);
245} catch(ErrorException $e) {
246    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
247    var_dump($e->getSeverity() === E_ERROR);
248    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
249    var_dump($e->getCode() === 0);
250    var_dump($e->getPrevious() === NULL);
251    var_dump($e->getFile() === __FILE__);
252    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
253}
254
255try {
256    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_WARNING, __FILE__);
257} catch(ErrorException $e) {
258    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
259    var_dump($e->getSeverity() === E_WARNING);
260    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
261    var_dump($e->getCode() === 0);
262    var_dump($e->getPrevious() === NULL);
263    var_dump($e->getFile() === __FILE__);
264    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
265}
266
267try {
268    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_PARSE, __FILE__);
269} catch(ErrorException $e) {
270    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
271    var_dump($e->getSeverity() === E_PARSE);
272    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
273    var_dump($e->getCode() === 0);
274    var_dump($e->getPrevious() === NULL);
275    var_dump($e->getFile() === __FILE__);
276    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
277}
278
279try {
280    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_NOTICE, __FILE__);
281} catch(ErrorException $e) {
282    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
283    var_dump($e->getSeverity() === E_NOTICE);
284    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
285    var_dump($e->getCode() === 0);
286    var_dump($e->getPrevious() === NULL);
287    var_dump($e->getFile() === __FILE__);
288    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
289}
290
291try {
292    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_ERROR, __FILE__);
293} catch(ErrorException $e) {
294    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
295    var_dump($e->getSeverity() === E_CORE_ERROR);
296    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
297    var_dump($e->getCode() === 0);
298    var_dump($e->getPrevious() === NULL);
299    var_dump($e->getFile() === __FILE__);
300    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
301}
302
303try {
304    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING, __FILE__);
305} catch(ErrorException $e) {
306    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
307    var_dump($e->getSeverity() === E_CORE_WARNING);
308    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
309    var_dump($e->getCode() === 0);
310    var_dump($e->getPrevious() === NULL);
311    var_dump($e->getFile() === __FILE__);
312    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
313}
314
315try {
316    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING, __FILE__);
317} catch(ErrorException $e) {
318    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
319    var_dump($e->getSeverity() === E_CORE_WARNING);
320    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
321    var_dump($e->getCode() === 0);
322    var_dump($e->getPrevious() === NULL);
323    var_dump($e->getFile() === __FILE__);
324    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
325}
326
327try {
328    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_ERROR, __FILE__);
329} catch(ErrorException $e) {
330    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
331    var_dump($e->getSeverity() === E_COMPILE_ERROR);
332    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
333    var_dump($e->getCode() === 0);
334    var_dump($e->getPrevious() === NULL);
335    var_dump($e->getFile() === __FILE__);
336    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
337}
338
339try {
340    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_WARNING, __FILE__);
341} catch(ErrorException $e) {
342    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
343    var_dump($e->getSeverity() === E_COMPILE_WARNING);
344    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
345    var_dump($e->getCode() === 0);
346    var_dump($e->getPrevious() === NULL);
347    var_dump($e->getFile() === __FILE__);
348    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
349}
350
351try {
352    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_ERROR, __FILE__);
353} catch(ErrorException $e) {
354    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
355    var_dump($e->getSeverity() === E_USER_ERROR);
356    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
357    var_dump($e->getCode() === 0);
358    var_dump($e->getPrevious() === NULL);
359    var_dump($e->getFile() === __FILE__);
360    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
361}
362
363try {
364    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_WARNING, __FILE__);
365} catch(ErrorException $e) {
366    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
367    var_dump($e->getSeverity() === E_USER_WARNING);
368    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
369    var_dump($e->getCode() === 0);
370    var_dump($e->getPrevious() === NULL);
371    var_dump($e->getFile() === __FILE__);
372    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
373}
374
375try {
376    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_NOTICE, __FILE__);
377} catch(ErrorException $e) {
378    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
379    var_dump($e->getSeverity() === E_USER_NOTICE);
380    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
381    var_dump($e->getCode() === 0);
382    var_dump($e->getPrevious() === NULL);
383    var_dump($e->getFile() === __FILE__);
384    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
385}
386
387try {
388    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__);
389} catch(ErrorException $e) {
390    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
391    var_dump($e->getSeverity() === E_STRICT);
392    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
393    var_dump($e->getCode() === 0);
394    var_dump($e->getPrevious() === NULL);
395    var_dump($e->getFile() === __FILE__);
396    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
397}
398
399try {
400    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__);
401} catch(ErrorException $e) {
402    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
403    var_dump($e->getSeverity() === E_RECOVERABLE_ERROR);
404    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
405    var_dump($e->getCode() === 0);
406    var_dump($e->getPrevious() === NULL);
407    var_dump($e->getFile() === __FILE__);
408    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
409}
410
411try {
412    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_DEPRECATED, __FILE__);
413} catch(ErrorException $e) {
414    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
415    var_dump($e->getSeverity() === E_DEPRECATED);
416    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
417    var_dump($e->getCode() === 0);
418    var_dump($e->getPrevious() === NULL);
419    var_dump($e->getFile() === __FILE__);
420    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
421}
422
423try {
424    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_DEPRECATED, __FILE__);
425} catch(ErrorException $e) {
426    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
427    var_dump($e->getSeverity() === E_USER_DEPRECATED);
428    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
429    var_dump($e->getCode() === 0);
430    var_dump($e->getPrevious() === NULL);
431    var_dump($e->getFile() === __FILE__);
432    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
433}
434
435try {
436    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_ERROR, __FILE__, __LINE__);
437} catch(ErrorException $e) {
438    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
439    var_dump($e->getSeverity() === E_ERROR);
440    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
441    var_dump($e->getCode() === 0);
442    var_dump($e->getPrevious() === NULL);
443    var_dump($e->getFile() === __FILE__);
444    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
445}
446
447try {
448    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_WARNING, __FILE__, __LINE__);
449} catch(ErrorException $e) {
450    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
451    var_dump($e->getSeverity() === E_WARNING);
452    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
453    var_dump($e->getCode() === 0);
454    var_dump($e->getPrevious() === NULL);
455    var_dump($e->getFile() === __FILE__);
456    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
457}
458
459try {
460    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_PARSE, __FILE__, __LINE__);
461} catch(ErrorException $e) {
462    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
463    var_dump($e->getSeverity() === E_PARSE);
464    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
465    var_dump($e->getCode() === 0);
466    var_dump($e->getPrevious() === NULL);
467    var_dump($e->getFile() === __FILE__);
468    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
469}
470
471try {
472    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_NOTICE, __FILE__, __LINE__);
473} catch(ErrorException $e) {
474    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
475    var_dump($e->getSeverity() === E_NOTICE);
476    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
477    var_dump($e->getCode() === 0);
478    var_dump($e->getPrevious() === NULL);
479    var_dump($e->getFile() === __FILE__);
480    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
481}
482
483try {
484    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_ERROR, __FILE__, __LINE__);
485} catch(ErrorException $e) {
486    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
487    var_dump($e->getSeverity() === E_CORE_ERROR);
488    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
489    var_dump($e->getCode() === 0);
490    var_dump($e->getPrevious() === NULL);
491    var_dump($e->getFile() === __FILE__);
492    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
493}
494
495try {
496    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING, __FILE__, __LINE__);
497} catch(ErrorException $e) {
498    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
499    var_dump($e->getSeverity() === E_CORE_WARNING);
500    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
501    var_dump($e->getCode() === 0);
502    var_dump($e->getPrevious() === NULL);
503    var_dump($e->getFile() === __FILE__);
504    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
505}
506
507try {
508    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING, __FILE__, __LINE__);
509} catch(ErrorException $e) {
510    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
511    var_dump($e->getSeverity() === E_CORE_WARNING);
512    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
513    var_dump($e->getCode() === 0);
514    var_dump($e->getPrevious() === NULL);
515    var_dump($e->getFile() === __FILE__);
516    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
517}
518
519try {
520    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_ERROR, __FILE__, __LINE__);
521} catch(ErrorException $e) {
522    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
523    var_dump($e->getSeverity() === E_COMPILE_ERROR);
524    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
525    var_dump($e->getCode() === 0);
526    var_dump($e->getPrevious() === NULL);
527    var_dump($e->getFile() === __FILE__);
528    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
529}
530
531try {
532    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_WARNING, __FILE__, __LINE__);
533} catch(ErrorException $e) {
534    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
535    var_dump($e->getSeverity() === E_COMPILE_WARNING);
536    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
537    var_dump($e->getCode() === 0);
538    var_dump($e->getPrevious() === NULL);
539    var_dump($e->getFile() === __FILE__);
540    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
541}
542
543try {
544    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_ERROR, __FILE__, __LINE__);
545} catch(ErrorException $e) {
546    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
547    var_dump($e->getSeverity() === E_USER_ERROR);
548    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
549    var_dump($e->getCode() === 0);
550    var_dump($e->getPrevious() === NULL);
551    var_dump($e->getFile() === __FILE__);
552    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
553}
554
555try {
556    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_WARNING, __FILE__, __LINE__);
557} catch(ErrorException $e) {
558    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
559    var_dump($e->getSeverity() === E_USER_WARNING);
560    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
561    var_dump($e->getCode() === 0);
562    var_dump($e->getPrevious() === NULL);
563    var_dump($e->getFile() === __FILE__);
564    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
565}
566
567try {
568    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_NOTICE, __FILE__, __LINE__);
569} catch(ErrorException $e) {
570    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
571    var_dump($e->getSeverity() === E_USER_NOTICE);
572    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
573    var_dump($e->getCode() === 0);
574    var_dump($e->getPrevious() === NULL);
575    var_dump($e->getFile() === __FILE__);
576    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
577}
578
579try {
580    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__);
581} catch(ErrorException $e) {
582    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
583    var_dump($e->getSeverity() === E_STRICT);
584    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
585    var_dump($e->getCode() === 0);
586    var_dump($e->getPrevious() === NULL);
587    var_dump($e->getFile() === __FILE__);
588    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
589}
590
591try {
592    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__);
593} catch(ErrorException $e) {
594    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
595    var_dump($e->getSeverity() === E_RECOVERABLE_ERROR);
596    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
597    var_dump($e->getCode() === 0);
598    var_dump($e->getPrevious() === NULL);
599    var_dump($e->getFile() === __FILE__);
600    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
601}
602
603try {
604    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_DEPRECATED, __FILE__, __LINE__);
605} catch(ErrorException $e) {
606    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
607    var_dump($e->getSeverity() === E_DEPRECATED);
608    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
609    var_dump($e->getCode() === 0);
610    var_dump($e->getPrevious() === NULL);
611    var_dump($e->getFile() === __FILE__);
612    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
613}
614
615try {
616    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_DEPRECATED, __FILE__, __LINE__);
617} catch(ErrorException $e) {
618    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
619    var_dump($e->getSeverity() === E_USER_DEPRECATED);
620    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
621    var_dump($e->getCode() === 0);
622    var_dump($e->getPrevious() === NULL);
623    var_dump($e->getFile() === __FILE__);
624    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
625}
626
627try {
628    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_DEPRECATED, __FILE__, __LINE__, NULL);
629} catch(ErrorException $e) {
630    echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
631    var_dump($e->getSeverity() === E_USER_DEPRECATED);
632    var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
633    var_dump($e->getCode() === 0);
634    var_dump($e->getPrevious() === NULL);
635    var_dump($e->getFile() === __FILE__);
636    var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
637}
638
639try {
640    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_ERROR, __FILE__, __LINE__, NULL);
641} catch(Exception $exceptionErr) {
642    try {
643        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_ERROR, __FILE__, __LINE__, $exceptionErr->getPrevious());
644    } catch(ErrorException $e) {
645        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
646        var_dump($e->getSeverity() === E_ERROR);
647        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
648        var_dump($e->getCode() === 0);
649        var_dump($e->getPrevious() === NULL);
650        var_dump($e->getFile() === __FILE__);
651        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
652    }
653}
654
655try {
656    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_WARNING, __FILE__, __LINE__, NULL);
657} catch(Exception $exceptionErr) {
658    try {
659        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_WARNING, __FILE__, __LINE__, $exceptionErr->getPrevious());
660    } catch(ErrorException $e) {
661        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
662        var_dump($e->getSeverity() === E_WARNING);
663        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
664        var_dump($e->getCode() === 0);
665        var_dump($e->getPrevious() === NULL);
666        var_dump($e->getFile() === __FILE__);
667        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
668    }
669}
670
671try {
672    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_PARSE, __FILE__, __LINE__, NULL);
673} catch(Exception $exceptionErr) {
674    try {
675        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_PARSE, __FILE__, __LINE__, $exceptionErr->getPrevious());
676    } catch(ErrorException $e) {
677        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
678        var_dump($e->getSeverity() === E_PARSE);
679        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
680        var_dump($e->getCode() === 0);
681        var_dump($e->getPrevious() === NULL);
682        var_dump($e->getFile() === __FILE__);
683        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
684    }
685}
686
687
688try {
689    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_NOTICE, __FILE__, __LINE__, NULL);
690} catch(Exception $exceptionErr) {
691    try {
692        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_NOTICE, __FILE__, __LINE__, $exceptionErr->getPrevious());
693    } catch(ErrorException $e) {
694        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
695        var_dump($e->getSeverity() === E_NOTICE);
696        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
697        var_dump($e->getCode() === 0);
698        var_dump($e->getPrevious() === NULL);
699        var_dump($e->getFile() === __FILE__);
700        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
701    }
702}
703
704try {
705    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_ERROR, __FILE__, __LINE__, NULL);
706} catch(Exception $exceptionErr) {
707    try {
708        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_ERROR, __FILE__, __LINE__, $exceptionErr->getPrevious());
709    } catch(ErrorException $e) {
710        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
711        var_dump($e->getSeverity() === E_CORE_ERROR);
712        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
713        var_dump($e->getCode() === 0);
714        var_dump($e->getPrevious() === NULL);
715        var_dump($e->getFile() === __FILE__);
716        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
717    }
718}
719
720try {
721    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING, __FILE__, __LINE__, NULL);
722} catch(Exception $exceptionErr) {
723    try {
724        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_CORE_WARNING, __FILE__, __LINE__, $exceptionErr->getPrevious());
725    } catch(ErrorException $e) {
726        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
727        var_dump($e->getSeverity() === E_CORE_WARNING);
728        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
729        var_dump($e->getCode() === 0);
730        var_dump($e->getPrevious() === NULL);
731        var_dump($e->getFile() === __FILE__);
732        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
733    }
734}
735
736try {
737    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_ERROR, __FILE__, __LINE__, NULL);
738} catch(Exception $exceptionErr) {
739    try {
740        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_ERROR, __FILE__, __LINE__, $exceptionErr->getPrevious());
741    } catch(ErrorException $e) {
742        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
743        var_dump($e->getSeverity() === E_COMPILE_ERROR);
744        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
745        var_dump($e->getCode() === 0);
746        var_dump($e->getPrevious() === NULL);
747        var_dump($e->getFile() === __FILE__);
748        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
749    }
750}
751
752try {
753    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_WARNING, __FILE__, __LINE__, NULL);
754} catch(Exception $exceptionErr) {
755    try {
756        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_COMPILE_WARNING, __FILE__, __LINE__, $exceptionErr->getPrevious());
757    } catch(ErrorException $e) {
758        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
759        var_dump($e->getSeverity() === E_COMPILE_WARNING);
760        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
761        var_dump($e->getCode() === 0);
762        var_dump($e->getPrevious() === NULL);
763        var_dump($e->getFile() === __FILE__);
764        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
765    }
766}
767
768try {
769    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_ERROR, __FILE__, __LINE__, NULL);
770} catch(Exception $exceptionErr) {
771    try {
772        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_ERROR, __FILE__, __LINE__, $exceptionErr->getPrevious());
773    } catch(ErrorException $e) {
774        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
775        var_dump($e->getSeverity() === E_USER_ERROR);
776        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
777        var_dump($e->getCode() === 0);
778        var_dump($e->getPrevious() === NULL);
779        var_dump($e->getFile() === __FILE__);
780        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
781    }
782}
783
784try {
785    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_WARNING, __FILE__, __LINE__, NULL);
786} catch(Exception $exceptionErr) {
787    try {
788        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_WARNING, __FILE__, __LINE__, $exceptionErr->getPrevious());
789    } catch(ErrorException $e) {
790        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
791        var_dump($e->getSeverity() === E_USER_WARNING);
792        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
793        var_dump($e->getCode() === 0);
794        var_dump($e->getPrevious() === NULL);
795        var_dump($e->getFile() === __FILE__);
796        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
797    }
798}
799
800try {
801    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_NOTICE, __FILE__, __LINE__, NULL);
802} catch(Exception $exceptionErr) {
803    try {
804        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_NOTICE, __FILE__, __LINE__, $exceptionErr->getPrevious());
805    } catch(ErrorException $e) {
806        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
807        var_dump($e->getSeverity() === E_USER_NOTICE);
808        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
809        var_dump($e->getCode() === 0);
810        var_dump($e->getPrevious() === NULL);
811        var_dump($e->getFile() === __FILE__);
812        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
813    }
814}
815
816try {
817    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__, NULL);
818} catch(Exception $exceptionErr) {
819    try {
820        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_STRICT, __FILE__, __LINE__, $exceptionErr->getPrevious());
821    } catch(ErrorException $e) {
822        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
823        var_dump($e->getSeverity() === E_STRICT);
824        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
825        var_dump($e->getCode() === 0);
826        var_dump($e->getPrevious() === NULL);
827        var_dump($e->getFile() === __FILE__);
828        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
829    }
830}
831
832try {
833    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__, NULL);
834} catch(Exception $exceptionErr) {
835    try {
836        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_RECOVERABLE_ERROR, __FILE__, __LINE__, $exceptionErr->getPrevious());
837    } catch(ErrorException $e) {
838        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
839        var_dump($e->getSeverity() === E_RECOVERABLE_ERROR);
840        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
841        var_dump($e->getCode() === 0);
842        var_dump($e->getPrevious() === NULL);
843        var_dump($e->getFile() === __FILE__);
844        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
845    }
846}
847
848try {
849    throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_DEPRECATED, __FILE__, __LINE__, NULL);
850} catch(Exception $exceptionErr) {
851    try {
852        throw new ErrorException(EXCEPTION_PARAM_MSG, EXCEPTION_CODE_ERROR, E_USER_DEPRECATED, __FILE__, __LINE__, $exceptionErr->getPrevious());
853    } catch(ErrorException $e) {
854        echo EXCEPTION_SEVERITY_ERROR_MSG . $e->getSeverity();
855        var_dump($e->getSeverity() === E_USER_DEPRECATED);
856        var_dump($e->getMessage() === EXCEPTION_PARAM_MSG);
857        var_dump($e->getCode() === 0);
858        var_dump($e->getPrevious() === NULL);
859        var_dump($e->getFile() === __FILE__);
860        var_dump($e->getTraceAsString() === EXCEPTION_TRACE_AS_STRING_MSG);
861    }
862}
863
864?>
865--EXPECT--
866This exception severity is: 1bool(true)
867bool(true)
868bool(true)
869bool(true)
870bool(true)
871bool(true)
872This exception severity is: 1bool(true)
873bool(true)
874bool(true)
875bool(true)
876bool(true)
877bool(true)
878This exception severity is: 1bool(true)
879bool(true)
880bool(true)
881bool(true)
882bool(true)
883bool(true)
884This exception severity is: 1bool(true)
885bool(true)
886bool(true)
887bool(true)
888bool(true)
889bool(true)
890This exception severity is: 2bool(true)
891bool(true)
892bool(true)
893bool(true)
894bool(true)
895bool(true)
896This exception severity is: 4bool(true)
897bool(true)
898bool(true)
899bool(true)
900bool(true)
901bool(true)
902This exception severity is: 8bool(true)
903bool(true)
904bool(true)
905bool(true)
906bool(true)
907bool(true)
908This exception severity is: 16bool(true)
909bool(true)
910bool(true)
911bool(true)
912bool(true)
913bool(true)
914This exception severity is: 32bool(true)
915bool(true)
916bool(true)
917bool(true)
918bool(true)
919bool(true)
920This exception severity is: 32bool(true)
921bool(true)
922bool(true)
923bool(true)
924bool(true)
925bool(true)
926This exception severity is: 64bool(true)
927bool(true)
928bool(true)
929bool(true)
930bool(true)
931bool(true)
932This exception severity is: 128bool(true)
933bool(true)
934bool(true)
935bool(true)
936bool(true)
937bool(true)
938This exception severity is: 256bool(true)
939bool(true)
940bool(true)
941bool(true)
942bool(true)
943bool(true)
944This exception severity is: 512bool(true)
945bool(true)
946bool(true)
947bool(true)
948bool(true)
949bool(true)
950This exception severity is: 1024bool(true)
951bool(true)
952bool(true)
953bool(true)
954bool(true)
955bool(true)
956This exception severity is: 2048bool(true)
957bool(true)
958bool(true)
959bool(true)
960bool(true)
961bool(true)
962This exception severity is: 4096bool(true)
963bool(true)
964bool(true)
965bool(true)
966bool(true)
967bool(true)
968This exception severity is: 8192bool(true)
969bool(true)
970bool(true)
971bool(true)
972bool(true)
973bool(true)
974This exception severity is: 16384bool(true)
975bool(true)
976bool(true)
977bool(true)
978bool(true)
979bool(true)
980This exception severity is: 1bool(true)
981bool(true)
982bool(true)
983bool(true)
984bool(true)
985bool(true)
986This exception severity is: 2bool(true)
987bool(true)
988bool(true)
989bool(true)
990bool(true)
991bool(true)
992This exception severity is: 4bool(true)
993bool(true)
994bool(true)
995bool(true)
996bool(true)
997bool(true)
998This exception severity is: 8bool(true)
999bool(true)
1000bool(true)
1001bool(true)
1002bool(true)
1003bool(true)
1004This exception severity is: 16bool(true)
1005bool(true)
1006bool(true)
1007bool(true)
1008bool(true)
1009bool(true)
1010This exception severity is: 32bool(true)
1011bool(true)
1012bool(true)
1013bool(true)
1014bool(true)
1015bool(true)
1016This exception severity is: 32bool(true)
1017bool(true)
1018bool(true)
1019bool(true)
1020bool(true)
1021bool(true)
1022This exception severity is: 64bool(true)
1023bool(true)
1024bool(true)
1025bool(true)
1026bool(true)
1027bool(true)
1028This exception severity is: 128bool(true)
1029bool(true)
1030bool(true)
1031bool(true)
1032bool(true)
1033bool(true)
1034This exception severity is: 256bool(true)
1035bool(true)
1036bool(true)
1037bool(true)
1038bool(true)
1039bool(true)
1040This exception severity is: 512bool(true)
1041bool(true)
1042bool(true)
1043bool(true)
1044bool(true)
1045bool(true)
1046This exception severity is: 1024bool(true)
1047bool(true)
1048bool(true)
1049bool(true)
1050bool(true)
1051bool(true)
1052This exception severity is: 2048bool(true)
1053bool(true)
1054bool(true)
1055bool(true)
1056bool(true)
1057bool(true)
1058This exception severity is: 4096bool(true)
1059bool(true)
1060bool(true)
1061bool(true)
1062bool(true)
1063bool(true)
1064This exception severity is: 8192bool(true)
1065bool(true)
1066bool(true)
1067bool(true)
1068bool(true)
1069bool(true)
1070This exception severity is: 16384bool(true)
1071bool(true)
1072bool(true)
1073bool(true)
1074bool(true)
1075bool(true)
1076This exception severity is: 1bool(true)
1077bool(true)
1078bool(true)
1079bool(true)
1080bool(true)
1081bool(true)
1082This exception severity is: 2bool(true)
1083bool(true)
1084bool(true)
1085bool(true)
1086bool(true)
1087bool(true)
1088This exception severity is: 4bool(true)
1089bool(true)
1090bool(true)
1091bool(true)
1092bool(true)
1093bool(true)
1094This exception severity is: 8bool(true)
1095bool(true)
1096bool(true)
1097bool(true)
1098bool(true)
1099bool(true)
1100This exception severity is: 16bool(true)
1101bool(true)
1102bool(true)
1103bool(true)
1104bool(true)
1105bool(true)
1106This exception severity is: 32bool(true)
1107bool(true)
1108bool(true)
1109bool(true)
1110bool(true)
1111bool(true)
1112This exception severity is: 32bool(true)
1113bool(true)
1114bool(true)
1115bool(true)
1116bool(true)
1117bool(true)
1118This exception severity is: 64bool(true)
1119bool(true)
1120bool(true)
1121bool(true)
1122bool(true)
1123bool(true)
1124This exception severity is: 128bool(true)
1125bool(true)
1126bool(true)
1127bool(true)
1128bool(true)
1129bool(true)
1130This exception severity is: 256bool(true)
1131bool(true)
1132bool(true)
1133bool(true)
1134bool(true)
1135bool(true)
1136This exception severity is: 512bool(true)
1137bool(true)
1138bool(true)
1139bool(true)
1140bool(true)
1141bool(true)
1142This exception severity is: 1024bool(true)
1143bool(true)
1144bool(true)
1145bool(true)
1146bool(true)
1147bool(true)
1148This exception severity is: 2048bool(true)
1149bool(true)
1150bool(true)
1151bool(true)
1152bool(true)
1153bool(true)
1154This exception severity is: 4096bool(true)
1155bool(true)
1156bool(true)
1157bool(true)
1158bool(true)
1159bool(true)
1160This exception severity is: 8192bool(true)
1161bool(true)
1162bool(true)
1163bool(true)
1164bool(true)
1165bool(true)
1166This exception severity is: 16384bool(true)
1167bool(true)
1168bool(true)
1169bool(true)
1170bool(true)
1171bool(true)
1172This exception severity is: 16384bool(true)
1173bool(true)
1174bool(true)
1175bool(true)
1176bool(true)
1177bool(true)
1178This exception severity is: 1bool(true)
1179bool(true)
1180bool(true)
1181bool(true)
1182bool(true)
1183bool(true)
1184This exception severity is: 2bool(true)
1185bool(true)
1186bool(true)
1187bool(true)
1188bool(true)
1189bool(true)
1190This exception severity is: 4bool(true)
1191bool(true)
1192bool(true)
1193bool(true)
1194bool(true)
1195bool(true)
1196This exception severity is: 8bool(true)
1197bool(true)
1198bool(true)
1199bool(true)
1200bool(true)
1201bool(true)
1202This exception severity is: 16bool(true)
1203bool(true)
1204bool(true)
1205bool(true)
1206bool(true)
1207bool(true)
1208This exception severity is: 32bool(true)
1209bool(true)
1210bool(true)
1211bool(true)
1212bool(true)
1213bool(true)
1214This exception severity is: 64bool(true)
1215bool(true)
1216bool(true)
1217bool(true)
1218bool(true)
1219bool(true)
1220This exception severity is: 128bool(true)
1221bool(true)
1222bool(true)
1223bool(true)
1224bool(true)
1225bool(true)
1226This exception severity is: 256bool(true)
1227bool(true)
1228bool(true)
1229bool(true)
1230bool(true)
1231bool(true)
1232This exception severity is: 512bool(true)
1233bool(true)
1234bool(true)
1235bool(true)
1236bool(true)
1237bool(true)
1238This exception severity is: 1024bool(true)
1239bool(true)
1240bool(true)
1241bool(true)
1242bool(true)
1243bool(true)
1244This exception severity is: 2048bool(true)
1245bool(true)
1246bool(true)
1247bool(true)
1248bool(true)
1249bool(true)
1250This exception severity is: 4096bool(true)
1251bool(true)
1252bool(true)
1253bool(true)
1254bool(true)
1255bool(true)
1256This exception severity is: 16384bool(true)
1257bool(true)
1258bool(true)
1259bool(true)
1260bool(true)
1261bool(true)
1262