title: PHP exit and still output buffer
body: <p>Is it possible to exit the script, say on a fatal error and still output my buffer? I am using a template system that executes the header/content/footer. So I am trying to make it so it'll stop code executing on the <code>fatal_error()</code> function but still output the buffer template (which sends out the error message to the user while still maintaining the website template.) I use <code>ob_start("ob_gzhandler")</code> and in my <code>fatal_error()</code> function I use <code>ob_flush()</code> and I end up with a white screen when <code>fatal_error()</code> is called. Here's my function</p>
  
  <pre><code>function fatal_error($error_message, $log = true)
  {
      setup_error($error_message);
  
      ob_flush();
      exit();
  }
  </code></pre>
  
  <p><code>setup_error()</code> tells the script to change the content body to the error message (so it doesn't parse 1/2 the body when the error occurs). All the examples I've looked through says <code>ob_flush()</code> or <code>ob_end_flush()</code> can achieve this, though I'm not having any luck.</p>