What I want to do is slightly change the way php handles errors - when a fatal error or a warning occurs, as well as printing the message out on the screen, I want php to write out the error, source and date / time of the error to a file. This saves me waiting for a user to report and error on the site or until I come across it myself, also it would save me having to rewrite all my scripts to incorporate this extra functionality.
Does anyone know how to do this? Thanks in advance.