This is useful when you want to control the errors outputted tot he screen or is a class or some other code is not behaving as expected, such as the ADOdb error class.
The following code will preserve the current error reporting level so once your code has finished running the system's error reporting will be returned to its normal state.
// Get current PHP error reporting level $reporting_level = error_reporting(); // Disable PHP error reporting (works globally) error_reporting(0); // Add you code here // Re-Enable PHP error reporting error_reporting($reporting_level);