title: How do I catch a PHP fatal (`E_ERROR`) error?
body: <p>I can use <code>set_error_handler()</code> to catch most PHP errors, but it doesn't work for fatal (<code>E_ERROR</code>) errors, such as calling a function that doesn't exist. Is there another way to catch these errors?</p>
  
  <p>I am trying to call <code>mail()</code> for all errors and am running PHP 5.2.3.</p>