I get the following error:
[23-Feb-2011 19:51:29] PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 512 bytes) in /obj/cla
In php you can set your own exception handler and error handler, see also documentation on php.net. When an error occurs you can print backtrace and dump that to file or screen.
Look at the php functions:
set_exception_handler()
set_error_handler()
debug_backtrace();
Hope it helps, Greetz, Erwin Haantjes