- time: documentation ( source)
- set_time_limit: documentation ( source)
- register_shutdown_function: documentation ( source)
- sleep: documentation ( source)
<?php
$start = time();
register_shutdown_function(function() use ($start){
sleep(2);
echo time()-$start;
});
set_time_limit(1);
sleep(2);
echo 123;