PHP error_reporting exclude notice and deprecated

For information to anyone who want to exclude more than one option of error_reporting in PHP, use this:

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

Use () and | to pick errors that you DON'T want to show.

Source: http://stackoverflow.com/questions/2803772/turn-off-deprecated-errors-php-5-3

Comments

Popular posts from this blog

TCPDF How to show/display Chinese Character?

How to fix fancy box/Easy Fancybox scroll not work in mobile

Wordpress Load balancing: 2 web servers 1 MySQL without any Cloud services