- var_dump: documentation ( source)
- set_error_handler: documentation ( source)
<?php
function test() {
set_error_handler(function ($errno, $errstr, $errfile, $errline, $context = null) {
var_dump($context);
});
$a = 1;
$$a = 2;
$x++; // generates error
}
test();