error_reporting

int error_reporting([int reporting_level) 

Sets the level of error reporting for the current script.

Returns:

Integer (bitmask) containing the previous level of error reporting; FALSE on error

Description:

error_reporting() specifies which level(s) of PHP errors are reported within the current document and returns the previous level of error reporting. The new settings take effect immediately after the function call is made.

If error_reporting() is called without any arguments, the current level of error reporting is returned.

The error reporting level can be set with either an integer or a named constant. Multiple integers or constants can be combined with bitwise operators.Any PHP bitwise operator can be used (&, |, ,

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.