What Are the Main Error Types in PHP

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 🙂

If you like FreeWebMentor and you would like to contribute, you can write an article and mail your article to [email protected] Your article will appear on the FreeWebMentor main page and help other developers.

Recommended Posts:


Prem Tiwari

An engineer by profession and a passionate blogger by heart. Founder of FreeWebMentor.com (A Programming blog for beginners), Tech Speaker at various forums. A part from this he is an open source enthusiast, WordPress Lover, Blogger, SEO, and Growth Strategic.