This is possible, and even a good idea. You can have PHP mail you, or, less sexy but slightly simpler, just write it in a flat file somewhere.
Check out error_reporting(), error_log(), and die(). I believe you could fairly easily use either of the last two in conjuction with mail() to get the desired effect.
HTH,