- restore_error_handler: documentation ( source)
- set_error_handler: documentation ( source)
<?php
function a() {
$f = function() { return get_called_class(); };
return $f();
}
class A {
protected $a;
public function foo() {
set_error_handler(function() {});
get_called_class();
restore_error_handler();
$f = function() {
echo a();
};
$f();
}
}
$a = new A;
$a->foo();