+2  A: 
ob_start(array($this, 'fatal_error_handler'));
Alix Axel
Thanks!!! This works, however, only if the handler function is marked as public (there's absolutely no output for protected or private). I wonder if there's any way around that?
Traveling Tech Guy
Not sure if this works but you can try passing $this by reference, ie: ob_start(array(
Alix Axel
Traveling Tech Guy
@TTG: Since `fatal_error_handler` is called from outside the class, there's no way around it that respects visibility until PHP 5.3, when we get closures with our lambdas. Why is the error handler private/protected?
outis
I wanted it to be private (i.e, not accessible to the outside world), but now I have to keep it public :(
Traveling Tech Guy