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

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
}

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