- var_dump: documentation ( source)
- set_exception_handler: documentation ( source)
- set_error_handler: documentation ( source)
<?php
set_error_handler('myerrorhandler');
set_exception_handler('myexceptionhandler');
function myfunc(stdClass $a) {}
function myerrorhandler($errno, $errstr, $errfile, $errline, $errcontext) {
echo "Error handler\n$errno\n$errstr\n";
}
function myexceptionhandler($e) {
echo "Exception handler\n";var_dump($e);
}
myfunc('iamnotaclass');