note 92809 modified in function.error-get-last by danbrown

From: Date: Mon, 10 Aug 2009 17:15:36 +0000
Subject: note 92809 modified in function.error-get-last by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-159279@lists.php.net to get a copy of this message
This function will give you the most recent error even when that error is a Fatal error. Example Usage: <?php register_shutdown_function('handleFatalPhpError'); function handleFatalPhpError() { $last_error = error_get_last(); if($last_error['type'] === E_ERROR) { echo "Can do custom output and/or logging for fatal error here..."; } } ?> --was-- This function will give you the most recent error even when that error is a Fatal error. Example Usage: register_shutdown_function('handleFatalPhpError'); function handleFatalPhpError() { $last_error = error_get_last(); if($last_error['type'] === E_ERROR) { echo "Can do custom output and/or logging for fatal error here..."; } } http://php.net/manual/en/function.error-get-last.php

« previous php.notes (#159279) next »