PHP has four main types of errors at run time, plus deprecated messages.
| Type | Meaning | Stops the script? |
|---|
| Parse error | Wrong syntax, like a missing semicolon or bracket | Yes, nothing runs |
| Fatal error | A serious problem, like calling a function that does not exist | Yes |
| Warning | A problem, but PHP can go on, like a missing include file | No |
| Notice | A small problem, like using an undefined variable (in PHP 8 this is a warning) | No |
| Deprecated | You use a feature that will be removed in future | No |
In PHP 7 and above many fatal errors are thrown as Error objects, so you can catch them. Learn how to show, hide and handle errors in PHP Errors.
Learn more about the similar topics:
| Exercises & Assignments |
|
No Content Found.
|