Explain the Main types of Errors

0

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.
Php
asked May 17, 2023 at 17:21
Sign in to add a comment

0 Answers

0
πŸ“ No answers yet!

Be the first to answer this interview question.

Your Answer

Sign in to post your answer and help the community.