-
Notifications
You must be signed in to change notification settings - Fork 7.8k
There's __FILE__, __LINE__, __METHOD__, __CLASS__ and slow debug_backtrace() call. Why not create __TRACE__ ? #18437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Because it's not constant. It changes depending on where the function is called from. https://3v4l.org/mmYE5 |
Mdahaha. "We are not creating the function because the requester named it incorrectly" |
Sigh. Have you even tried to understand my comment? Constants don't change value between execution. |
FILE is the same as file TRACE in my opinion is just array with all described above
Exactly if you want to store all inside error object with simple word I mean Also good feature would be or something mean that can be used by |
So you're basically wanting something easier to write than Unless you limit yourself to the associative array in the previous paragraph, I'm not seeing where the performance savings would be made. I'm also not seeing the what benefits of such a performance gain would be to what is a debugging tool that (a) shouldn't be getting executed that often in the first place, and (b) when it does would only be a prelude to much more time spent fixing the bug that it has revealed. |
Description
I mean constant trace that equals first step of debug_backtrace() without arguments.
Before i compared exception creation with calling debug_backtrace(NO_ARGS, limit = 1) and creating exception was FASTER.
But using constants like FILE and LINE is faster 4 times that creating the exception. Why not create TRACE constant to give possibility to require argument filled with this TRACE ?
The text was updated successfully, but these errors were encountered: