function displayErrorWithoutCrap() { // returning false here means the internal PHP error handler will take over again and display a neat, clean error return false; } set_error_handler('displayErrorWithoutCrap');