- set_error_handler: documentation ( source)
<?php
$convert_error_to_exception = function ($level, $message, $file, $line, $context=null){
throw new ErrorException($message, 0, $level, $file, $line);
};
set_error_handler($convert_error_to_exception);
class boop {
}
$boop = new boop();
$boop->biip();