1.

Explain the main types of errors.

Answer»

The 3 main TYPES of errors in PHP are:

  • NOTICES: Notices are non-critical errors that can occur during the execution of the script. These are not VISIBLE to users. Example: Accessing an undefined variable.
  • Warnings: These are more critical than notices. Warnings don’t interrupt the script execution. By default, these are visible to the user. Example: include() a file that doesn’t exist.
  • Fatal: This is the most critical error TYPE which, when occurs, immediately terminates the execution of the script. Example: Accessing a property of a non-existent object or require() a non-existent file.


Discussion

No Comment Found