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.

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

报告相同问题?

悬赏问题

  • ¥15 springboot 3.0 实现Security 6.x版本集成
  • ¥15 PHP-8.1 镜像无法用dockerfile里的CMD命令启动 只能进入容器启动,如何解决?(操作系统-ubuntu)
  • ¥15 请帮我解决一下下面六个代码
  • ¥15 关于资源监视工具的e-care有知道的嘛
  • ¥35 MIMO天线稀疏阵列排布问题
  • ¥60 用visual studio编写程序,利用间接平差求解水准网
  • ¥15 Llama如何调用shell或者Python
  • ¥20 谁能帮我挨个解读这个php语言编的代码什么意思?
  • ¥15 win10权限管理,限制普通用户使用删除功能
  • ¥15 minnio内存占用过大,内存没被回收(Windows环境)