Executing functions in parallel

前端 未结 6 1660
情歌与酒
情歌与酒 2020-12-16 18:55

I have a function that needs to go over around 20K rows from an array, and apply an external script to each. This is a slow process, as PHP is waiting for the script to be e

6条回答
  •  不思量自难忘°
    2020-12-16 19:40

    Have a look at pcntl_fork. This allows you to spawn child processes which can then do the separate work that you need.

提交回复
热议问题