Display all PHP Errors and Warnings

ctrl-ZVXWhen debugging PHP I find myself searching again and again for this little piece of code to display the PHP errors. So here it is for future reference…
If you wish to see all the PHP errors and warnings in your script, simply include the following bit of code:

error_reporting(E_ALL);
ini_set(‘display_errors’, ‘1’);

Now, continue to beat your head against the keyboard while you hunt down that missing semicolon or closing parenthesis. Need help, contact My Brain.