Why is this PHP error script not emailing me for fatal errors?
<p>I am using the following script from nettuts:</p>

<pre><code>// Our custom error handler  
function error_engine($number, $message, $file, $line, $vars)  

{  
    $email = " 
        &lt;p&gt;An error ($number) occurred on line  
        &lt;strong&gt;$line&lt;/strong&gt; and in the &lt;strong&gt;file: $file.&lt;/strong&gt;  
        &lt;p&gt; $message &lt;/p&gt;";  

    $email .= "&lt;pre&gt;" . print_r($vars, 1) . "&lt;/pre&gt;";  

    $headers = 'Content-type: text/html; charset=iso-8859-1' . "\r\n";  

    // Email the error to someone...  
    error_log($email, 1, 'example@example.com', $headers);  


    if ( ($number !== E_NOTICE) &amp;&amp; ($number &lt; 2048) ) {  
        die("There was an error. Please try again later.");  
    }  
}  

// We should use our custom function to handle errors.  
set_error_handler('error_engine'); 
</code></pre>

<p>It works fine for notices and warnings and such, but when I purposely break my script, say by changing "mysqli_connect" to "mysqy_connct" I get the fatal error printing out on the screen and no email!</p>

<p>Is an error like that beyond the scope of this type of error logging/reporting?</p>

<p>What am I doing wrong?   </p>
