What Are the Main Error Types in PHP

Prem Tiwari - - PHP Tutorials


In this tutorial, I will explain what are the error types in PHP with an example. There are three types of error in PHP.

  • Notices
  • Warning
  • Fatal Error

I have also shared an example of every error types to better understanding of PHP errors.

php-logo

Notices: Simple, non-critical errors that are occurred during the script execution. Ideally, we should fix all notices.

Warning: more important than Notice but it is also non-critical errors that are occurred during the script execution. It should be fixed.

Fatal Error: is critical errors. If any fatal error in your code, then your script execution will be stopped and it must be fixed.

Liked this tutorial? Do Like & share with your friends 🙂