This link may be helpful:
http://php.net/manual/en/book.errorfunc.php
My approach to handling errors
- Set error_log( ‘My-Project-Path’ );
- Set error_reporting(-1); // maximum
- Set ini_set(‘display_errors’, 0); // do not show on screen
- Monitor error log file and modify script to prevent further errors.