<?php class Foo { private function logError(): bool { debug_print_backtrace(); return true; } } $foo = new Foo(); \Closure::bind(function () use ($foo) { set_error_handler([$foo, 'logError']); }, null, Foo::class)(); // /set_error_handler([$foo, 'logError']);
You have javascript disabled. You will not be able to edit any code.