1. Home
  2. Computer Science MCQs
  3. PHP
  4. What is the description of Error level E_ERROR?

Added 19 Jan 2024

What is the description of Error level E_ERROR?

  1. Fatal run-time error Correct answer
  2. Near-fatal error
  3. Compile-time error
  4. Fatal Compile-time error

Correct answer

A. Fatal run-time error

17 views

MCQSEXAM

Explanation

The E_ERROR error level in PHP represents a fatal runtime error. When this type of error occurs, it means that something critical has happened, and the script cannot continue to execute. The error typically results from issues that prevent the correct execution of the script, such as calling an undefined function, accessing a non-existent class or variable, or other serious runtime problems.

Here's a brief description of E_ERROR:

E_ERROR: Fatal run-time errors

  • Description: Indicates a critical error that cannot be recovered. The script is terminated immediately when such an error occurs.

  • Example scenarios:

    • Calling an undefined function or method.
    • Attempting to include a file that does not exist.
    • Division by zero.
    • Uncaught exceptions.
  • Handling: Since E_ERROR is fatal and halts the script execution, it's important to identify and fix the issues causing these errors. Commonly, developers use debugging tools and techniques to locate and resolve the root cause of such errors

Video explanation

Reference

https://www.php.net/manual/en/function.error-reporting.php

Doubts & discussion

Not sure why the answer is A? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More PHP MCQs

Practise all PHP MCQs

Similar MCQs