In search of an example how to implement a top-level exception handler in PHP I came across this nice site containing lots of well explained tutorials and articles:

http://www.phpro.org