例子:
function foo($a,$b){ bar(); } function bar(){ // Magic Print } foo('hello', 'world');
输出:
foo('hello','world')
你可以从 debug_backtrace() .
function bar(){ $backtrace = debug_backtrace(); $t = $backtrace[1]; print $t["function"] . "('" . implode("','", $t["args"]) . "')\n"; }