What are the different types of errors in php?
An error is a coding mistake. In php there are 4 different types of errors:
- Notice: It is used to give out a warning or information to the user. This error does not stop the execution of the script. This occurs when we try to access undefined variables.
- Warning: Warning errors do not stop execution of the script. Warning error is given whenever a call is made to a missing file or to undefined constants.
- Fatal Errors: When a piece of code is written to do something that cannot be done, Fatal error occurs. If you are trying to call undefined functions it gives out fatal error. Fatal error stops the execution of the script.
- Parse Errors: If there is a mistake in syntax in the script, then the output is Parse error. A parse error also stops the execution of the script.