Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PHP error_reporting(0) affect error logging, or just display?

Does error_reporting(0); have any effect on error logging (to file), or does it just suppress on-screen error display?

Thanks.

like image 753
user167850 Avatar asked Dec 16 '09 02:12

user167850


1 Answers

Yes, it affects both.

The error_reporting level defines what levels of errors gets triggered. Whether you log or display those errors are determined by the other settings.

To summarize:

  • error_reporting: What levels of errors get triggered.
  • display_errors: Whether to show triggered errors in script output.
  • log_errors: Whether to write triggered errors to a log.

In essence, setting error_reporting(0) means that you've turned off error reporting, and nothing will be logged to file or output to the screen.

like image 96
zombat Avatar answered Oct 24 '22 02:10

zombat