How to run a PHP function concurrently against an array?
<p>I have a PHP web app which scrapes a search engine for a given keyword.</p>

<p>Currently the app is looping through an array of keywords running the scrape function one keyword at a time.</p>

<p>This is OK at the moment because the number of keywords is fairly small, but it won't scale well.</p>

<p>I think the best way to go will be to select a smaller set of keywords from the mysql db using limit, and then run the scrape function concurrently against the entire array. Once that set has finished, I'll move on to the next set.</p>

<p>But I'm stuck with how to run the function concurrently against the array.</p>

<p>How would you handle this?</p>
