How many error levels are available in PHP 5?
Correct answer
C. 16
17 views
C. 16
17 views
PHP, there are several error levels, also known as error reporting levels, that help you control and manage how errors are displayed or logged. These error levels are represented by constants and are used with the error_reporting() function. Here are the main error levels in PHP:
E_ERROR: A fatal run-time error that can't be recovered. Execution of the script is halted.
E_WARNING: Non-fatal run-time error. Execution of the script is not halted.
E_PARSE: Compile-time parse errors. These occur during the parsing of the script.
E_NOTICE: 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.
E_CORE_ERROR: Fatal errors that occur during PHP's initial startup (e.g., when trying to include a file with a syntax error).
E_CORE_WARNING: Non-fatal errors that occur during PHP's initial startup.
E_COMPILE_ERROR: Fatal compile-time errors. These occur during the compilation of a script.
E_COMPILE_WARNING: Non-fatal compile-time errors. These occur during the compilation of a script.
E_USER_ERROR: User-generated error message. It's like E_ERROR but triggered by the user using the trigger_error() function.
E_USER_WARNING: User-generated warning message. It's like E_WARNING but triggered by the user using the trigger_error() function.
E_USER_NOTICE: User-generated notice message. It's like E_NOTICE but triggered by the user using the trigger_error() function.
E_STRICT: Enable to have PHP suggest changes to your code to ensure compatibility with future versions.
E_RECOVERABLE_ERROR: Catchable fatal error. Indicates a dangerous error occurred, but the script can still continue to execute.
E_DEPRECATED: Run-time notices. Inform about deprecated features that will be removed in future versions.
E_USER_DEPRECATED: User-generated deprecation warning. It's like E_DEPRECATED but triggered by the user using the trigger_error() function.
Not sure why the answer is C? Ask here and get an explanation.