PHP是否可以限制函数执行时间,以使下列伪代码的功能得以实现?foreach($jobsas$job){try{run($job);}catch(TimeoutException$e){printf("Timeout:%s\n",$e->getMessage());continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
foreach($jobsas$job){try{run($job);}catch(TimeoutException$e){printf("Timeout:%s\n",$e->getMessage());continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
try{run($job);}catch(TimeoutException$e){printf("Timeout:%s\n",$e->getMessage());continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
run($job);}catch(TimeoutException$e){printf("Timeout:%s\n",$e->getMessage());continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
}catch(TimeoutException$e){printf("Timeout:%s\n",$e->getMessage());continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
printf("Timeout:%s\n",$e->getMessage());continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
continue;}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
}}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
}functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
functionrun($job){//ssh,HTTPrequest,ConnectDBetc.}
//ssh,HTTPrequest,ConnectDBetc.}
}
慕虎7371278
www说
相关分类