PHP error_reporting() Function

PHP error_reporting Function


Define :

In this tutorial we have to learn about PHP error_reporting() Function.This is inbuit function in php.This function is used to set which PHP errors are reported. in php has many level of errors by using this funciton we can sets that level for current script.

Syntax
  error_reporting(error_level)
Parameters :
error_level Optional. Specify the error_reporting level for the current script. It takes on either a bitmask, or named constants which are described in the predefined constants. Using named constants is recommended to ensure compatibility for future versions.

Given below example below we can see different error level reporting: