- var_dump: documentation ( source)
- set_error_handler: documentation ( source)
<?php
class Foo {
public function test() {
echo $undef;
}
public function test2() {
$x = $this; // use $this
echo $undef;
}
}
set_error_handler(function($_1, $_2, $_3, $_4, $ctx) {
var_dump(isset($ctx['this']));
});
(new Foo)->test();
(new Foo)->test2();