Scriptplayground

 Print Page | Close Window

Error Reporting In PHP

Ever want to hide errors on a PHP page or just show really critical ones? If so, this article will explain them to you.

// Report all PHP errors
error_reporting(E_ALL);

Here is a table of different error levels, all linking back to PHP.net

error_reporting() level constants and bit values

value constant
1 E_ERROR
2 E_WARNING
4 E_PARSE
8 E_NOTICE
16 E_CORE_ERROR
32 E_CORE_WARNING
64 E_COMPILE_ERROR
128 E_COMPILE_WARNING
256 E_USER_ERROR
512 E_USER_WARNING
1024 E_USER_NOTICE
2047 E_ALL
2048 E_STRICT

Find this article at:
http://scriptplayground.com/tutorials/php/Error-Reporting-In-PHP/