title: concurrency in PHP
body: <p>I'm at a point in my PHP server-side API where I am making lots of MySQL queries and I'd like to speed it up by having mutliple threads working on different queries and then return the results.</p>
  
  <p>But how do I make another thread in PHP? I am passing around POST params, so a simple <code>shell_exec()</code> could work, but seems kinda of unsafe. Options I'm considering:</p>
  
  <p>1) Make a cURL request using the parameters I have, process the JSON from the request and then return</p>
  
  <p>2) Call a <code>shell_exec()</code> with PHP CLI and somehow (how would I do this??) process the response in PHP</p>
  
  <p>what are the best options here?</p>