Is debug_backtrace() safe for serious usage in production environment?

前端 未结 3 500
情话喂你
情话喂你 2021-01-21 01:41

It\'s functionality is so strong that I worry about its stability and performance.

What do you think?

UPDATE

What I\'m doing is this:

3条回答
  •  太阳男子
    2021-01-21 02:28

    Well, considering its name, I'm not sure I would use it as a "normal" part of my application -- even though I don't remember having read anything which said that it was either good nor bad.


    I don't really know what you mean about "serious usage", but :

    • If you need that function for your application to work, it migh indicate some problem in your design
    • This function can be useful in an error-handler, when you want to log how/where an error happened : it will make the log files more useful, when it comes to tracking down the sources of errors

    Though, not sure that "error logging" corresponds to your definition of serious usage ?

提交回复
热议问题