Error handling in PHP

后端 未结 9 1701
长情又很酷
长情又很酷 2020-12-02 08:40

I\'m familiar with some of the basics, but what I would like to know more about is when and why error handling (including throwing exceptions) should be used in PHP, especia

9条回答
  •  臣服心动
    2020-12-02 09:02

    The best practice IMHO is to use the following approach: 1. create an error/exception handler 2. start it upon the app start up 3. handle all your errors from inside there

    
    

提交回复
热议问题