/** * returns html formated stack trace * @param array $trace * @return string */ function formatTrace($trace) { $html = '<table>'; foreach ($trace as $k => $t) { if (isset($t['file'])) { $file = $t['file']; $path = jFile::unparseJelixPath($file, '<i>', '</i>'); } else { $file = '[php]'; } $html .= '<tr><td>' . $k . '</td><td>' . (isset($t['class']) ? $t['class'] . $t['type'] : '') . $t['function'] . '()</td>'; $html .= '<td>' . $file . '</td><td>' . (isset($t['line']) ? $t['line'] : '') . '</td></tr>'; } $html .= '</table>'; return $html; }