/** * Shows the trace output. */ public static function show_trace($trace) { $start = 0; if (!isset($trace[0]['line'])) { $trace[0]['line'] = $trace[0]['args'][3]; } if (!isset($trace[0]['file'])) { $trace[0]['file'] = $trace[0]['args'][2]; } if ($trace[0]['file'] === $trace[1]['file'] && $trace[0]['line'] === $trace[1]['line']) { $start++; } for ($i = $start, $count = count($trace); $i < $count; $i++) { echo Debugger::show_trace_step($trace[$i]); } if (isset($trace[0]['args']) && is_array($trace[0]['args'][4])) { Debugger::show_context($trace[0]['args'][4]); } }
/** * Shows the trace output. */ public static function show_trace($trace) { $start = 0; if (!isset($trace[0]['line'])) { $trace[0]['line'] = $trace[0]['args'][3]; } if (!isset($trace[0]['file'])) { $trace[0]['file'] = $trace[0]['args'][2]; } if ($trace[0]['file'] === $trace[1]['file'] && $trace[0]['line'] === $trace[1]['line']) { $start++; } for ($i = $start, $count = count($trace); $i < $count; $i++) { echo Debugger::show_trace_step($trace[$i]); } $context = array('_COOKIE' => isset($_COOKIE) ? $_COOKIE : array(), '_SERVER' => $_SERVER); if (isset($trace[0]['args']) && is_array($trace[0]['args'][4])) { $context = array_merge($context, $trace[0]['args'][4]); } Debugger::show_context($context); }