title: How to execute shell command from php in background
body: <p>How can I execute shell command in background using <code>&amp;</code> at the end? I've try:</p>
  
  <pre><code>php -r "shell_exec('sleep 10 &amp;');"
  </code></pre>
  
  <p>and</p>
  
  <pre><code>php -r "shell_exec('/bin/bash -c \"sleep 10 &amp;\"');"
  </code></pre>
  
  <p>in both cases it pause for 10 seconds instead of just give the shell back and run sleep in background.</p>