August 11th, 2008, 06:54 AM
Changing Error Reporting in php.ini
Is this correct when switching on all error types in the php.ini file:
I don't know the exact "wording" for the above.
error_reporting = E_ALL & E_NOTICE & E_STRICT
(can't look it up now, don't have PHP installed on this machine)
Having everything switched on, can someone give me an example of when PHP will give me a E_NOTICE or a E_STRICT, because I am not sure if I have come across them before.
August 11th, 2008, 07:05 AM
well, as far as I know setting error_reporting to E_ALL will contain E_NOTICE , etc ... too
and about your second question : consider this code , dude :
notice string : Notice: Use of undefined constant x - assumed 'x' in somewhere ...
P.S : setting display_errors to off (in php.ini or in the code by ini_set) will cause nothing to display , even you set error_reporting to E_ALL !
hope it helps ,
Comments on this post
August 11th, 2008, 08:05 AM
Thanks for your reply and great example nima_a!
I didn't think that the E_ALL would contain the other options since when I first installed PHP, the default was this:
So I assumed they were separate?? Maybe someone can confirm their inclusiveness?
error_reporting = E_ALL & ~E_NOTICE & ~E_STRICT
August 11th, 2008, 08:13 AM