Afternoon,
I've been looking around for a while without success to see if there's a method to display a custom error page, whenever any PHP error arises, hiding the error from users - currently achieved by error_reporting(0), then emailing the specific error to my email address.
Initial logic (I know it's not right, it's just to help you understand better):
if(error_reporting){
    ob_clean();
    include('classes/email.php');
    $email = new email($pdo);
    $email->mailError(ERROR_REPORT);
    include('error-page.php');
    die();
}
Any help would be much appreciated, thanks!