@ 2016-01-11T16:00:20Z <?php
set_error_handler(function ($errno, $errstr, $errfile, $errline) {
$namespace = 'ajf\ErrorExceptions\Dynamic';
$className = implode('', explode(' ', ucwords($errstr)));
$fullClassName = $namespace . '\\' . $className;
if (!class_exists($fullClassName)) {
eval("namespace $namespace { class $className extends \ErrorException {} }");
}
throw new $fullClassName($errstr, 0, $errno, $errfile, $errline);
});
try {
$foo = 1/0;
} catch (ajf\ErrorExceptions\Dynamic\DivisionByZero $e) {
echo "ba-da-bing, ba-da-boom: I caught a $e!\n";
}
try {
$repent = sin("123abc");
} catch (ajf\ErrorExceptions\Dynamic\ANonWellFormedNumericStringEncountered $e) {
echo "praise be to zend_is_numeric_string_ex: $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) 7.0.2 0.040 0.073 20.30 7.0.1 0.003 0.043 20.25 7.0.0 0.007 0.050 20.20 5.6.17 0.027 0.060 20.45 5.6.16 0.003 0.050 20.43 5.6.15 0.007 0.067 18.17 5.6.14 0.003 0.080 18.15 5.6.13 0.007 0.077 18.12 5.6.12 0.007 0.083 21.01 5.6.11 0.010 0.057 21.13 5.6.10 0.010 0.080 21.01 5.6.9 0.010 0.063 21.00 5.6.8 0.010 0.057 20.51 5.5.31 0.027 0.040 20.26 5.5.30 0.010 0.033 18.02 5.5.29 0.010 0.077 17.99 5.5.28 0.010 0.083 20.78 5.5.27 0.013 0.050 20.65 5.5.26 0.003 0.060 20.88 5.5.25 0.003 0.080 20.69 5.5.24 0.013 0.037 20.35
preferences:dark mode live preview
145.35 ms | 1394 KiB | 7 Q