Custom error handler functions for PHP.