php: Custom Error Handling

Sends email and saves to a logfile. :)