In PHP, I'd like to get the details about a function call inside the function itself. The behavior I want (without doing this) is to have debug_backtrace()
passed as an argument to the function.
I want that done automatically, for every call to a function.
I need this so I can have pre-defined errors for a fairly sizable project I'm working on, but I obviously want the line number of a central trigger_error()
call, as that's not very useful for tracking down the problem. I also don't want to count on future developers to remember a debug_backtrace()
argument.