title: PHP don't wait for response / reply return immediately
body: <p>I have a web service written in PHP to which an iPhone app connects to. When the app calls the service, a series of notification messages are sent to Apple's APNs server so it can then send Push Notifications to other users of the app.</p>
  
  <p>This process can be time consuming in some cases and my app has to wait a long time before getting a response. The response is totally independent of the result of the notification messages being sent to the APNs server.</p>
  
  <p>Therefore, I would like the web service to send the response back to the app regardless of whether the messages to APNs have been sent.</p>
  
  <p>My current code:</p>
  
  <pre><code>&lt;?
      &lt;...&gt;
      echo $chatID; // This has to be printed immediately
      include('apns.php'); // Just invoke this, dont wait for response! 
  ?&gt;
  </code></pre>
  
  <p>How do I do this?</p>