As far as tracking function usage, I might do:
PHP Code:
function_a()
{
isset($GLOBALS['function_count'][__FUNCTION__]) ?
$GLOBALS['function_count'][__FUNCTION__]) + 1 : 1;
// rest of function definition . . .
}
// end of script:
$log = __FILE__ . " (" . date('Y-m-d H:i:s') . "): ";
foreach($GLOBALS['function_count'] as $function => $count)
{
$log .= $function = $count . "; ";
}
error_log(rtrim($log, " ;"));
?>
[/php]
Then just check the PHP error log for usage (or specify a separate file in the call to error_log()).
Bookmarks