What are different types of errors available in PHP?

Posted by Prem Tiwari | Updated on

The different types of error in PHP are:

  • E_ERROR– A fatal error that causes script termination.
  • E_WARNING– Run-time warning that does not cause script termination.
  • E_PARSE– Compile time parse error.
  • E_NOTICE– Run time notice caused due to error in code.
  • E_CORE_ERROR– Fatal errors that occur during PHP initial startup.
  • E_CORE_WARNING– Warnings that occur during PHP initial startup.
  • E_COMPILE_ERROR– Fatal compile-time errors indication problem with script.
  • E_USER_ERROR– User-generated error message.
  • E_USER_WARNING– User-generated warning message.
  • E_USER_NOTICE- User-generated notice message.
  • E_STRICT– Run-time notices.
  • E_RECOVERABLE_ERROR– Catchable fatal error indicating a dangerous error
  • E_ALL– Catches all errors and warnings.

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers