Is there a compelling reason to not use debug_backtrace for the sole purpose of determining the calling method\'s class, name, and parameter list? Not for debugging purposes
Is there a compelling reason to not use debug_backtrace for the sole purpose of determining the calling method's class, name, and parameter list?
Yes. The point is, it's generally a sign of bad design if your code requires such a tight coupling that the callee has to have these information about its caller. Therefore, if you feel the need to use these information, you probably should rethink your design.
Put bluntly, the callee should not need to have these information to perform its task. The exceptions, of course, revolve around debugging, logging and more generally other kinds of code introspection (but even there, beware of it).