From Good-Tutorials: PHP –PHP error handling script:
A simple guide explaining some of the basic error handling capabilities of PHP. Also features an error handling script that anyone can download and use. Some prior knowledge of PHP may be required.