Home  • Programming • PHP

Error reporting with PHP

Depending on whether you're programming/debbuging or installing a script on a production server, you may want error reporting more or less verbose. Here's how to change it:
<?
// Disable all error reporting
error_reporting(0);

// Default configuration
error_reporting(E_ALL ^ E_NOTICE);

// Display extra warnings about uninitialised variables, etc
error_reporting(E_ALL);
?> 

Comments 9


Copyright © 2026. Powered by Intellect Software Ltd