I'm triyng to catch timeout error to output some clear text to the user (like "Sorry, timeout"). So why does this example:
function shutdown() {
$a=error_get_last();
if($a==null)
echo "No errors";
else
print_r($a);
}
register_shutdown_function('shutdown');
ini_set('max_execution_time',1 );
sleep(3);
output no errors
?? I'm confused about it.
Here this example looks helpful.
Thanks