- set_error_handler: documentation ( source)
<?php
$a = "test!";
$b = "test B!";
function errhnd($errno, $errstr, $errfile, $errline) {
# need $a and $b vars here!
echo $GLOBALS['a'];
echo "<br />";
echo $GLOBALS['b'];
echo "<br />";
echo $errno;
}
set_error_handler('errhnd');
fuidaa;