Notices, Warnings, Parse and Fatal type errors in PHP.
Notices:
Notices represents non-critical errors, i.e. accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all but whenever required, you can change this default behavior.
Warnings:
Warnings are more serious errors but they do not result in script termination. i.e calling include() a file which does not exist. By default, these errors are displayed to the user.
Parse errors:
Parse errors are syntax errors, if you miss the semicolon or braces like ; {. It will raises an errors and it will displays the line number where the error is exactly. Parse errors stop the execution of php script.
Fatal errors:
Fatal errors are critical errors i.e. calling a non-existent function or class. These errors cause the immediate termination of the script.
To see errors change values in php.ini file
Notices:
Notices represents non-critical errors, i.e. accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all but whenever required, you can change this default behavior.
Warnings:
Warnings are more serious errors but they do not result in script termination. i.e calling include() a file which does not exist. By default, these errors are displayed to the user.
Parse errors:
Parse errors are syntax errors, if you miss the semicolon or braces like ; {. It will raises an errors and it will displays the line number where the error is exactly. Parse errors stop the execution of php script.
Fatal errors:
Fatal errors are critical errors i.e. calling a non-existent function or class. These errors cause the immediate termination of the script.
To see errors change values in php.ini file
error_reporting = E_ALL
display_errors = 1
<?php
error_reporting(E_ALL);
ini_set("display_errors", 1);
include("./broken-script.php");
?>
0 comments:
Post a Comment