/** * return formatted backtrace field * * @param array $backtrace Backtrace data * @param string $separator Arguments separator to use * @param string $lines Lines separator to use * * @return string formatted backtrace */ public static function formatBacktrace($backtrace, $separator, $lines) { $retval = ''; foreach ($backtrace as $step) { if (isset($step['file']) && isset($step['line'])) { $retval .= Error::relPath($step['file']) . '#' . $step['line'] . ': '; } if (isset($step['class'])) { $retval .= $step['class'] . $step['type']; } $retval .= Error::getFunctionCall($step, $separator); $retval .= $lines; } return $retval; }