0

I want to run 5 functions in parallel and all these functions will return result from SQL.

I planned to use pcntl_fork(); but didn't knew how to assign values to those variables.

floriank
  • 25,546
  • 9
  • 42
  • 66
Daljeet Singh
  • 704
  • 3
  • 7
  • 17
  • 2
    Please share the code you've tried so far, along with a specific question – Dan Smith Jan 21 '15 at 11:33
  • I was getting data from query, and single query take 10 second and queries are running one after the other, i want a process where all these queries run parallely and return me the result and assign to respective keys.`$result = array(); foreach( $array as $key => $value ) { $result[$value] = $this->getDetailData( $value ); }` – Daljeet Singh Jan 21 '15 at 11:36
  • I have gone through that doc as well, but how i assign the values assigned to it... – Daljeet Singh Jan 21 '15 at 11:46

0 Answers0