Bulgaria PHP Conference 2019

Voting

Please answer this simple SPAM challenge: max(zero, three)?
(Example: nine)

The Note You're Voting On

fjoggen at gmail dot com
13 years ago
This code will turn php errors into exceptions:

<?php
function exceptions_error_handler($severity, $message, $filename, $lineno) {
    throw new
ErrorException($message, 0, $severity, $filename, $lineno);
}

set_error_handler('exceptions_error_handler');
?>

However since <?php set_error_handler()?> doesn't work with fatal errors, you will not be able to throw them as Exceptions.

<< Back to user notes page

To Top