PHP Unconference Europe 2015

Error Reporting

As of PHP 5 new error reporting constant E_STRICT was introduced with value 2048. It enables run-time PHP suggestions on your code interoperability and forward compatibility, that will help you to keep latest and greatest suggested method of coding. E.g. STRICT message will warn you on using deprecated functions.

Nota: E_ALL does not include E_STRICT so it's not enabled by default

add a note add a note

User Contributed Notes 3 notes

up
6
Anonymous
2 years ago
According to the notes in the php.ini file, E_ALL *does* include E_STRICT; to exclude it you would use E_ALL & ~E_STRICT

This may be useful for someone who has upgraded and kept their old php.ini
up
4
matthew dot flaschen at gatech dot edu
1 year ago
E_ALL includes E_STRICT in 5.4.0 and up.
up
-2
Anonymous
6 years ago
To enable full error reporting (recommended for development boxes) use:

use error_reporting(E_ALL | E_STRICT);

or in php.ini:

error_reporting  =  E_ALL | E_STRICT
To Top