dounuo7954 2013-11-09 22:03
浏览 24
已采纳

对于每个循环调用一个重函数。 循环是否在函数完成之前调用该函数

I have a loop that calls a function that produces documents, a crap ton of variables and several emails. The loop will go through about 10-20 iterations on average and I am wondering if it calls the functions simultaneously or if it waits until the function is complete before it calls it again.

foreach ($campaign as $key=>$val){
    produce_docs($val['id']);
}

function produce_docs(campaign_id){
    //Big function
    //does not return anything
}
  • 写回答

1条回答 默认 最新

  • dpa89292 2013-11-09 23:20
    关注

    it will wait until the function is complete before calling it again.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?