global php error handling implemented