Types of Errors in PHP


Types of Errors in PHP
Errors are mainly divided into four types:

Notice Error:
Notice is nothing but a small message to user. It does not stop the execution of script, if you are trying to call undefined variable, the output is notice.

Click here to download example file.

Warning Error:
It is same as notice does not stop script execution, if you are trying to call undefined constant, the output is warning.
In PHP we can create a constant using define() function. To know more about constant click here.

Click here to download example file.

Fatal Error:
Fatal error stop the execution of script from the line where error is occurred, if you are trying to call undefined function, the output is fatal error.

Click here to download example file.

Parse Error:
If there is any syntax mistake in the script, output is parse error. It stop the execution of complete script.

Click here to download example file.
Types of Errors in PHP Types of Errors in PHP Reviewed by Abdul iTech on Saturday, March 09, 2019 Rating: 5

No comments:

Powered by Blogger.