I am trying to figure out how to get the name and parameters of a parent function.
Example:
function foo($a,$b){ bar(); } function bar(){ // Magic Print } foo('hello', 'world');
Conclusion:
foo('hello','world')
Any tips?
You can get information from debug_backtrace () .
function bar(){ $backtrace = debug_backtrace(); $t = $backtrace[1]; print $t["function"] . "('" . implode("','", $t["args"]) . "')\n"; }
Source: https://habr.com/ru/post/1309433/More articles:A secure way to communicate between applications on the same machine - javaSeparation of business logic - designLINQ If .Any fits. Any - c #Mapping Asp.net AJAX Calendar Extender Two Ways - ajaxUsing VCL for the Internet (intweb) as a trick to add a web interface to an inherited multilevel (2 level) Delphi win32 application makes sense? - sql-servergenerate php code from wsdl - wsdlHow to add line breaks to event header in json - jquerySet "Start with" to Oracle sequence dynamically - oracleBuffering db tabs in multithreaded program - javascale image in div after loading complete with jQuery - jqueryAll Articles