@ 2014-06-19T07:28:35Z <?php
try {
if (!function_exists('handleException')) {
/**
* @param \Exception $e
* @return string readable message
*/
function logException(\Exception $e)
{
$type = get_class($e);
$msg = $e->getMessage();
$trace = $e->getTraceAsString();
global $logger;
if (isset($logger)) {
$logger->error(sprintf("%s: %s\n%s", $type, $msg, $trace));
if (method_exists($logger, 'newrelicLog')) {
$logger->newrelicLog($e);
}
}
return sprintf("<h1>%s</h1><pre>%s<br/><h2>Debug Trace:</h2>%s</pre>", $type, $msg, $trace);
}
function handleException(\Exception $e)
{
$message = logException($e);
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
trigger_error('boo');
exit();
}
}
if (!isset($shutdownFunction)) {
$shutdownFunction = function () {
try {
$error = error_get_last();
if (isset($error)) {
throw new \Exception(
$error['message'] . ' in ' . $error['file'] . ' at line ' . $error['line'],
$error['type']
);
}
} catch (Exception $e) {
handleException($e);
}
};
register_shutdown_function($shutdownFunction);
}
if (!isset($errorHandler)) {
$errorHandler = function ($errno, $errstr, $errfile = null, $errline = null, $errcontext = []) {
// prevent exception to be thrown when error_reporting is turned off or suppressed with @
if (error_reporting() !== 0) {
throw new \Exception("$errstr in $errfile at line $errline", $errno);
} else {
echo "log $errstr in $errfile at line $errline");
}
};
set_error_handler($errorHandler);
}
if (!function_exists('handleException')) {
/**
* @param \Exception $e
* @return string readable message
*/
function logException(\Exception $e)
{
$type = get_class($e);
$msg = $e->getMessage();
$trace = $e->getTraceAsString();
global $logger;
if (isset($logger)) {
$logger->error(sprintf("%s: %s\n%s", $type, $msg, $trace));
if (method_exists($logger, 'newrelicLog')) {
$logger->newrelicLog($e);
}
}
return sprintf("<h1>%s</h1><pre>%s<br/><h2>Debug Trace:</h2>%s</pre>", $type, $msg, $trace);
}
function handleException(\Exception $e)
{
$message = logException($e);
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
include dirname(__FILE__) . '../modules/frontend/views/error/exception.phtml';
exit();
}
}
if (!isset($shutdownFunction)) {
$shutdownFunction = function () {
try {
$error = error_get_last();
if (isset($error)) {
throw new \Exception(
$error['message'] . ' in ' . $error['file'] . ' at line ' . $error['line'],
$error['type']
);
}
} catch (Exception $e) {
handleException($e);
}
};
register_shutdown_function($shutdownFunction);
}
if (!isset($errorHandler)) {
$errorHandler = function ($errno, $errstr, $errfile = null, $errline = null, $errcontext = []) {
// prevent exception to be thrown when error_reporting is turned off or suppressed with @
if (error_reporting() !== 0) {
throw new \Exception("$errstr in $errfile at line $errline", $errno);
} else {
echo "log $errstr in $errfile at line $errline");
}
};
set_error_handler($errorHandler);
}
throw new \Exception('after both');
} catch (\Exception $e) {
handleException($e);
}
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.29 0.009 0.046 12.53 5.4.28 0.009 0.037 12.42 5.4.27 0.010 0.062 12.43 5.4.26 0.007 0.050 12.42 5.4.25 0.009 0.052 12.43 5.4.24 0.010 0.047 12.42 5.4.23 0.008 0.042 12.41 5.4.22 0.009 0.041 12.42 5.4.21 0.009 0.043 12.42 5.4.20 0.010 0.043 12.42 5.4.19 0.010 0.041 12.41 5.4.18 0.010 0.038 12.41 5.4.17 0.008 0.042 12.41 5.4.16 0.008 0.038 12.41 5.4.15 0.011 0.040 12.41 5.4.14 0.010 0.043 12.10 5.4.13 0.011 0.046 12.08 5.4.12 0.009 0.043 12.04 5.4.11 0.008 0.038 12.04 5.4.10 0.010 0.037 12.04 5.4.9 0.009 0.036 12.04 5.4.8 0.009 0.043 12.04 5.4.7 0.010 0.046 12.04 5.4.6 0.008 0.041 12.04 5.4.5 0.008 0.039 12.04 5.4.4 0.007 0.037 12.02 5.4.3 0.010 0.035 12.02 5.4.2 0.007 0.037 12.02 5.4.1 0.014 0.056 12.02 5.4.0 0.005 0.043 11.51 5.3.28 0.008 0.041 12.71 5.3.27 0.008 0.045 12.72 5.3.26 0.010 0.039 12.72 5.3.25 0.006 0.045 12.72 5.3.24 0.008 0.043 12.72 5.3.23 0.009 0.039 12.71 5.3.22 0.009 0.043 12.68 5.3.21 0.010 0.039 12.68 5.3.20 0.014 0.049 12.68 5.3.19 0.008 0.043 12.68 5.3.18 0.011 0.043 12.67 5.3.17 0.010 0.039 12.68 5.3.16 0.010 0.062 12.67 5.3.15 0.007 0.041 12.67 5.3.14 0.008 0.043 12.66 5.3.13 0.013 0.058 12.65 5.3.12 0.012 0.053 12.66 5.3.11 0.009 0.038 12.66 5.3.10 0.009 0.039 12.15 5.3.9 0.005 0.039 12.13 5.3.8 0.009 0.042 12.13 5.3.7 0.009 0.042 12.13 5.3.6 0.009 0.061 12.11 5.3.5 0.009 0.044 12.05 5.3.4 0.008 0.047 12.06 5.3.3 0.007 0.045 12.02 5.3.2 0.008 0.058 11.80 5.3.1 0.008 0.051 11.76 5.3.0 0.011 0.061 11.75
preferences:dark mode live preview
150.38 ms | 1394 KiB | 7 Q