Explain different types of errors in PHP (i.e. arguments in
errorreporting function)?
Answer Posted / guest
error_reporting([int level]) sets the error_reporting
directive at runtime.
Different type of errors are as following:
1. E_ERROR : Fatal run-time errors.
2. E_WARNING : Run-time warning.
3. E_PARSE : Compile time parse error.
4. E_NOTICE : Run time notice.
5. E_CORE_ERROR : errors that occur during PHP's initial
startup.
6. E_CORE_WARNING : Warnings (non-fatal errors) that occur
during PHP's initial startup.
7. E_COMPILE_ERROR : Fatal compile-time errors.
8.E_USER_ERROR : User-generated error message.
9.E_USER_WARNING : User-generated warning message.
10. E_USER_NOTICE : User-generated notice message.
11.E_STRICT : Run-time notices. Enable to have PHP suggest
changes to your code which will ensure the best
interoperability and forward compatibility of your code.
12.E_RECOVERABLE_ERROR :Catchable fatal error. It indicates
that a probably dangerous error occured, but did not leave
the Engine in an unstable state.
13.E_ALL : All errors and warnings, as supported, except of
level E_STRICT in PHP < 6.
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
What is php constructor?
Why use static methods php?
How to repeat a string to a specific number of times in php?
What is return in php function?
How many types of inheritances used in php and how we achieve it.
What is the difference between get and post in php?
What is a lambda function in php?
Can you define an array argument as a reference type?
What is difference between ksort() and usort() functions.
How can you execute php script from the command line?
How do I stop a php script?
What is htaccess? Why do we use this and where?
Is php used in 2019?
How to retrieve values out of an array?
What is the role of php?