Handle fatal errors with register_shutdown_function

http://stackoverflow.com/questions/277224/how-do-i-catch-a-php-fatal-error