Speaking of error reporting in PHP we might all have seen the above values. So what do they mean? Which settings should I be using? What is the purpose and difference between these values? Let find that out!!

What the error_log will contain depends on the settings we use:

E_ALL : Everything

E_ALL & ~E_NOTICE : Report all errors except E_NOTICE

~E_ALL : Stop all

So, wait. Wont you be wondering ‘Isn’t it better to have all errors and notices to be logged as it creates more idea of the website and its issues.’

Well, there are instances when the disk space of accounts suddenly increase or hit its limits and with a little debugging you come to find that it is just the error_log file which gre exponentially to a large size. So, you might want to disable notices from being logged as they are not errors and just a deprecation warning or something you might be knowing.