- ob_start: documentation ( source)
- set_exception_handler: documentation ( source)
<?php
function exception_handler($e) {
print "Exception page\n";
exit();
}
set_exception_handler('exception_handler');
ob_start();
print "A\n";
ob_start();
print "B\n";
throw new Exception();