title: php redirect immediately and also continue execution which dont send data
body: <p>I need to execute a bunch of functions that consume nearly 50 seconds to complete. But i want redirect to page after execution few function itself and also continue further execution.</p>
  
  <p>The below function execute on form submit as in <code>process.php // it wont echo anything</code></p>
  
  <pre><code>// all function in serprate process page.
  func1
  func2
  func3
  // After above 3 function i need to php redirect to redirect now immediately example.com
  func4
  func5
  func6
  </code></pre>
  
  <p>I tried using php header but it won't immediately redirecting.</p>
  
  <pre><code>header("Location:http://www.example.com");
  </code></pre>
  
  <p>If I use <code>exit();</code> it will redirect but not process function 4,5 and 6.</p>
  
  <p>what i need is any way to redirect immediately after first 3 functions and continue execution.</p>