Turn off deprecated errors in PHP 5.3 Turn off deprecated errors in PHP 5.3 wordpress wordpress

Turn off deprecated errors in PHP 5.3


You can do it in code by calling the following functions.

error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);

or

error_reporting(E_ALL ^ E_DEPRECATED);


I needed to adapt this to

error_reporting = E_ALL & ~E_DEPRECATED


To only get those errors that cause the application to stop working, use:

error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));

This will stop showing notices, warnings, and deprecated errors.