--%>

Types of errors in PHP

Explain the different types of errors in PHP?

E

Expert

Verified

The types of errors in PHP are Notices, Warnings and Fatal errors.

1. Notices: Notices represents non-critical errors that is accessing a variable that has not yet been defined. Such kinds of errors are not displayed to the user at all by default, but whenever required you can change this default behavior.

2. Warnings: Warnings are more serious errors but they do not result in script termination. i.e calling include() a file which does not exist. These errors are displayed to the user by default.

3. Fatal errors: Calling a non-existent function or class Fatal errors are used. These errors cause the immediate termination of the script.

   Related Questions in PHP Web Programming