src/Dev/Backtrace.php
public static function get_rendered_backtrace($bt, $plainText = false, $ignoredFunctions = null)
    {
        if (empty($bt)) {
            return '';
        }
        $bt = self::filter_backtrace($bt, $ignoredFunctions);
        $result = ($plainText) ? '' : '<ul>';
        foreach ($bt as $item) {
            if ($plainText) {
                $result .= self::full_func_name($item, true) . "\n";
                if (isset($item['line']) && isset($item['file'])) {
                    $result .= basename($item['file']) . ":$item[line]\n";
                }
                $result .= "\n";
            } else {
                if ($item['function'] == 'user_error') {
                    $name = $item['args'][0];
                } else {
                    $name = self::full_func_name($item, true);
                }
                $result .= "<li><b>" . htmlentities($name, ENT_COMPAT, 'UTF-8') . "</b>\n<br />\n";
                $result .=  isset($item['file']) ? htmlentities(basename($item['file']), ENT_COMPAT, 'UTF-8') : '';
                $result .= isset($item['line']) ? ":$item[line]" : '';
                $result .= "</li>\n";
            }
        }
        if (!$plainText) {
            $result .= '</ul>';
        }
        return $result;
    }
public static function get_rendered_backtrace($bt, $plainText = false, $ignoredFunctions = null)
    {
        if (empty($bt)) {
            return '';
        }
        $bt = self::filter_backtrace($bt, $ignoredFunctions);
        $result = ($plainText) ? '' : '<ul>';
        foreach ($bt as $item) {
            if ($plainText) {
                $result .= self::full_func_name($item, true) . "\n";
                if (isset($item['line']) && isset($item['file'])) {
                    $result .= basename($item['file']) . ":$item[line]\n";
                }
                $result .= "\n";
            } else {
                if ($item['function'] == 'user_error') {
                    $name = $item['args'][0];
                } else {
                    $name = self::full_func_name($item, true);
                }
                $result .= "<li><b>" . htmlentities($name, ENT_COMPAT, 'UTF-8') . "</b>\n<br />\n";
                $result .=  isset($item['file']) ? htmlentities(basename($item['file']), ENT_COMPAT, 'UTF-8') : '';
                $result .= isset($item['line']) ? ":$item[line]" : '';
                $result .= "</li>\n";
            }
        }
        if (!$plainText) {
            $result .= '</ul>';
        }
        return $result;
    }
public static function get_rendered_backtrace ( $ bt , $ plainText = false , $ ignoredFunctions = null ) { if ( empty ( $ bt ) ) { return '' ; } $ bt = self :: filter_backtrace ( $ bt , $ ignoredFunctions ) ; $ result = ( $ plainText ) ? '' : '<ul>' ; foreach ( $ bt as $ item ) { if ( $ plainText ) { $ result .= self :: full_func_name ( $ item , true ) . "\n" ; if ( isset ( $ item [ 'line' ] ) && isset ( $ item [ 'file' ] ) ) { $ result .= basename ( $ item [ 'file' ] ) . ":$item[line]\n" ; } $ result .= "\n" ; } else { if ( $ item [ 'function' ] == 'user_error' ) { $ name = $ item [ 'args' ] [ 0 ] ; } else { $ name = self :: full_func_name ( $ item , true ) ; } $ result .= "<li><b>" . htmlentities ( $ name , ENT_COMPAT , 'UTF-8' ) . "</b>\n<br />\n" ; $ result .= isset ( $ item [ 'file' ] ) ? htmlentities ( basename ( $ item [ 'file' ] ) , ENT_COMPAT , 'UTF-8' ) : '' ; $ result .= isset ( $ item [ 'line' ] ) ? ":$item[line]" : '' ; $ result .= "</li>\n" ; } } if ( ! $ plainText ) { $ result .= '</ul>' ; } return $ result ; }
Render a backtrace array into an appropriate plain-text or HTML string.

@param array $bt The trace array, as returned by debug_backtrace() or Exception::getTrace()
@param boolean $plainText Set to false for HTML output, or true for plain-text output
@param array $ignoredFunctions List of functions that should be ignored. If not set, a default is provided
@return string The rendered backtrace
Render a backtrace array into an appropriate plain - text or HTML string .