- set_error_handler: documentation ( source)
<?php
function errorHandler($type, $string, $msg, $file = NULL, $line = NULL) {
echo "Dit gaat goed fout: ".$type.' : '. $msg.' in : '. $file.' on line : '. $line;
}
$warning = set_error_handler('errorHandler' , E_ALL);
$failure = 42 / 0;