There are three types of errors in PHP
- Notices
- Warnings
- Fatal Errors
Notices
- These errors are not displayed to the users. These are non-critical errors.
- This error occurs when you try to use a variable that has not been declared.
- These errors will not stop the script.
- This will notice and continue with the next termination of the script.
- Example: Trying to use a function that has not been declared.
Warnings
- These errors are more serious errors. But these errors will not terminate the script.
- By default, these errors are not displayed to the users.
- This would occur when you try to include a file that does not exist or delete a file that is not present.
- By default, this error will give the notice and continue with the script.
Fatal Errors
- Fatal errors can cause termination of the script.
- These are critical errors.
- Fatal errors are basically run time errors.
- It occurs when you try to access what you cant be done.
- Example: Trying to use a function that has not been declared.