From: Domas Mituzas Date: Mon, 14 Aug 2006 21:34:57 +0000 (+0000) Subject: add wfGetAllCallers(), utility function for some occasional profiling magic X-Git-Tag: 1.31.0-rc.0~55992 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=de8cfefc763d2fb488b51b5b245b20ba42deb320;p=lhc%2Fweb%2Fwiklou.git add wfGetAllCallers(), utility function for some occasional profiling magic --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index dc299f649b..0de411a697 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2073,4 +2073,15 @@ function wfGetCaller( $level = 2 ) { return $caller; } +/** Return a string consisting all callers in stack, somewhat useful sometimes for profiling specific points */ +function wfGetAllCallers() { + return implode('/', array_map( + create_function('$frame',' + return isset( $frame["class"] )? + $frame["class"]."::".$frame["function"]: + $frame["function"]; + '), + array_reverse(debug_backtrace()))); +} + ?>