PHP REPL handler on error/exception