DEV Community

Cover image for PHP Error Reporting
PHP Error Code
PHP Error Code

Posted on

PHP Error Reporting

A PHP application produces many degrees of errors during the runtime of the content. A PHP error is an information structure that addresses something that turned out badly in your application. The Php error reporting function permits you to set the level of PHP errors revealing, when your PHP content runs, or recover the present level of PHP error reporting, as characterized by your PHP design.

The error_reporting function acknowledges a solitary parameter, a number, which demonstrates which level of reporting permitting. Passing nothing as a parameter basically returns the present level set.

PHP.ini Configuration for Displaying All Errors

display_errors = on

The display_errors order should be set to β€œon” in the PHP ini document. This will show all php errors including punctuation or parse errors that can’t be shown simply by calling the ini_set function in the PHP code. The PHP ini document can be seen as in the shower result of phpinfo() function and is marked loaded configuration file. This order in the ini setup should be set to off, assuming the web application is underway.

Types Of Errors In PHP

  • Parse or Syntax errors
  • Fatal Errors
  • Warning or Alert Errors
  • Notice Errors

You can see more detail about it at PHP Error Reporting By PHP Error Code.

Top comments (0)