Loop over all bottom reports and if callable call them with $as_html parameter,
if not output as is (string).

@param bool $as_html
358855
static function printBottomReportsList( $as_html = true )
    {
        $debug = eZDebug::instance();
        $reportNames = array_keys( $debug->bottomReportsList );
        foreach ( $reportNames as $reportName )
        {
            if ( is_callable( $debug->bottomReportsList[$reportName] ) )
            {
                echo call_user_func_array( $debug->bottomReportsList[$reportName], array( $as_html ) );
            }
            else
            {
                echo $debug->bottomReportsList[$reportName];
            }
        }
    }
977531
public function tryAppendHTML($tag, $value)
    {
        return $this->_setOrAppend($tag, $value, false, true, false);
    }
1172991
protected function isHTML()
    {
        if (function_exists('headers_list') && $headers = headers_list())
        {
            foreach ((array) $headers as $header)
            {
                $header = strtolower($header);

                if (strpos($header, 'content-type:') === 0 && !strpos($header, 'text/html'))
                {
                    return false;
                }
            }
        }

        return true;
    }
375836
protected function checkXmlHttpRequest()
    {
        if (false === $this->container->get('request_stack')->getCurrentRequest()->isXmlHttpRequest() && false === $this->isDebug()) {
            $this->accessDenied();
        }
    }
258959
function generateReport(html) {
        var template = grunt.file.read(templates.reportTemplate);
        return grunt.template.process(template, {
            data: {
                scenarios: html
            }
        });
    }
325709
public static function vd($var, bool $dump = true, bool $stop = true, int $obLevel = 0): void
    {
        if ($stop) {
            while (ob_get_level() > $obLevel) {
                ob_end_clean();
            }
        }
        
        ob_start();
        if (empty($_SERVER['DOCUMENT_ROOT'])) {
            $dump ? var_dump($var) : print_r($var);
            echo PHP_EOL . str_replace("=>\n", '  =>', ob_get_clean());
        } else {
            echo '<pre>';
            $dump ? var_dump($var) : print_r($var);
            echo htmlspecialchars(str_replace("=>\n", '  =>', ob_get_clean()));
            echo '</pre>';
        }
        
        if ($stop) {
            throw new DebugStopExecutionException();
        }
    }
549174
static function handleDebug($dbgstr, $in_level)
    {
        if ( ReporticoApp::get("debug_mode") >= $in_level )
        {   
            $debug = &self::getSystemDebug();
            $debug[] = array (
            "dbgstr" => $dbgstr,
            "dbgarea" => ReporticoApp::get("code_area")
            );
        }
    }
121606
static function handleList( $parameters = array(), $asCount = false )
    {
        $parameters = array_merge( array( 'as_object' => true,
                                          'is_valid' => null,
                                          'offset' => false,
                                          'limit' => false,
                                          'only_published' => false ),
                                   $parameters );
        $asObject = $parameters['as_object'];
        $isValid = $parameters['is_valid'];
        $offset = $parameters['offset'];
        $limit = $parameters['limit'];
        $onlyPublished = $parameters['only_published'];
        $limitArray = null;
        if ( !$asCount and $offset !== false and $limit !== false )
            $limitArray = array( 'offset' => $offset,
                                 'length' => $limit );
        $conditions = array();
        if( $isValid === false ) $isValid = 0;
        if ( $isValid !== null )
        {
            $conditions['is_valid'] = $isValid;
        }
        if ( count( $conditions ) == 0 )
            $conditions = null;

        if ( $onlyPublished )  // Only fetch published urls
        {
            $conditionQuery = "";
            if ( $isValid !== null )
            {
                $isValid = (int) $isValid;
                $conditionQuery = " AND ezurl.is_valid=$isValid ";
            }
            $db = eZDB::instance();
            $cObjAttrVersionColumn = eZPersistentObject::getShortAttributeName( $db, eZURLObjectLink::definition(), 'contentobject_attribute_version' );

            if ( $asCount )
            {
                $urls = $db->arrayQuery( "SELECT count( DISTINCT ezurl.id ) AS count
                                            FROM
                                                 ezurl,
                                                 ezurl_object_link,
                                                 ezcontentobject_attribute,
                                                 ezcontentobject_version
                                            WHERE
                                                 ezurl.id                                     = ezurl_object_link.url_id
                                             AND ezurl_object_link.contentobject_attribute_id = ezcontentobject_attribute.id
                                             AND ezurl_object_link.$cObjAttrVersionColumn     = ezcontentobject_attribute.version
                                             AND ezcontentobject_attribute.contentobject_id   = ezcontentobject_version.contentobject_id
                                             AND ezcontentobject_attribute.version            = ezcontentobject_version.version
                                             AND ezcontentobject_version.status               = " . eZContentObjectVersion::STATUS_PUBLISHED . "
                                                 $conditionQuery" );
                return $urls[0]['count'];
            }
            else
            {
                $query = "SELECT DISTINCT ezurl.*
                            FROM
                                  ezurl,
                                  ezurl_object_link,
                                  ezcontentobject_attribute,
                                  ezcontentobject_version
                            WHERE
                                  ezurl.id                                     = ezurl_object_link.url_id
                              AND ezurl_object_link.contentobject_attribute_id = ezcontentobject_attribute.id
                              AND ezurl_object_link.$cObjAttrVersionColumn     = ezcontentobject_attribute.version
                              AND ezcontentobject_attribute.contentobject_id   = ezcontentobject_version.contentobject_id
                              AND ezcontentobject_attribute.version            = ezcontentobject_version.version
                              AND ezcontentobject_version.status               = " . eZContentObjectVersion::STATUS_PUBLISHED . "
                             $conditionQuery";

                if ( !$offset && !$limit )
                {
                    $urlArray = $db->arrayQuery( $query );
                }
                else
                {
                    $urlArray = $db->arrayQuery( $query, array( 'offset' => $offset,
                                                                 'limit'  => $limit ) );
                }
                if ( $asObject )
                {
                    $urls = array();
                    foreach ( $urlArray as $url )
                    {
                        $urls[] = new eZURL( $url );
                    }
                    return $urls;
                }
                else
                    $urls = $urlArray;
                return $urls;
            }
        }
        else
        {
            if ( $asCount )
            {
                $urls = eZPersistentObject::fetchObjectList( eZURL::definition(),
                                                             array(),
                                                             $conditions,
                                                             false,
                                                             null,
                                                             false,
                                                             false,
                                                             array( array( 'operation' => 'count( id )',
                                                                           'name' => 'count' ) ) );
                return $urls[0]['count'];
            }
            else
            {
                return eZPersistentObject::fetchObjectList( eZURL::definition(),
                                                            null, $conditions, null, $limitArray,
                                                            $asObject );
            }
        }
    }
251071
static function fetchCurrentScripts( $asObject = true, $offset = false, $limit = false )
    {
        $conditions = array( 'last_report_timestamp' => array( '>', time() - self::STATUS_VISIBLE_TIMEOUT ) );

        $sorting = array( 'last_report_timestamp' => 'desc' );

        $limitation = null;
        if ( $offset !== false or $limit !== false )
        {
            $limitation = array( 'offset' => $offset, 'length' => $limit );
        }

        return eZPersistentObject::fetchObjectList( eZScheduledScript::definition(),
                                                    null, $conditions, $sorting, $limitation, $asObject );
    }
1183431
def handle_startendtag(self, tag, attrs):
        """"""
        if tag.lower() in self.allowed_tag_whitelist:
            self.result += '<' + tag
            for (attr, value) in attrs:
                if attr.lower() in self.allowed_attribute_whitelist:
                    self.result += ' %s="%s"' % \
                        (attr, self.handle_attribute_value(value))
            self.result += ' />'
        else:
            if self.render_unallowed_tags:
                self.result += '&lt;' + cgi.escape(tag)
                for (attr, value) in attrs:
                    self.result += ' %s="%s"' % \
                        (attr, cgi.escape(value, True))
                self.result += ' /&gt;'
464692
function htmlReporter(reports, options = {}) {
  var {hide} = options;
  hide = hide || {};

  function htmlReporterOne({children, desc, status, counts, time, code}) {
    var text = T(desc);
    var attrs = {class: {[status]: true}};
    if (children) {
      return E('details') .
        has([
          E('summary') . has([text, !hide.counts && T(` (${makeCounts(counts)})`)]) . is(attrs),
          E('div') . has(htmlReporter(children, options))
        ]) .
        is(hide.children ? {} : {open: true});
    } else {
      return E('div') . has(text) . is(attrs);
    }
  }

  return M(reports, htmlReporterOne);
}
958651
public function status($html = false) {
		$msg = $this->run("status");
		if ($html == true) {
			$msg = str_replace("\n", "<br />", $msg);
		}
		return $msg;
	}
577899
public function parse($asxml = false)
    {
        $xml = new stdClass();

        // Error messages to XML
        if (isset($_SESSION['messages']) && !empty($_SESSION['messages'])) {
            $xml->messages = $_SESSION['messages'];
            unset($_SESSION['messages']);
        }

        // Page requisites
        foreach ($this->requisites as $k => $v) {
            if (is_array($v)) {
                $v = array_unique($v);
            }

            $xml->{$k} = $v;
        }

        // Properties
        foreach ($this->properties as $k => $v) {
            if (!empty($v)) {
                $xml->$k = $v;
            }
        }

        $this->addObject($xml, false, 'common');

        // Return parsed XHTML
        $module = $this->dom->createElement('module');
        $module->appendChild($this->page);
        $this->dom->firstChild->appendChild($module);

        if (error_reporting() === E_ALL) {
            Debug::__print(htmlspecialchars($this->toString()));
        }

        try {
            $retval = $this->asxml ? $this->toString() : $this->xsl->parse($this->dom);
        } catch (Exception $e) {
            Debug::__print($e->getMessage());
            $retval = false;
        }

        return $retval;
    }
570260
public function callPhpScript()
	{
		$call = $this->_callPhpScript;
		$this->setResultsOfCall($call($this, $this->_hash, '', $this->_script, $this->getArguments() ?: []));
	}
629055
private function htmlStartHandler(string $tag, array $attrs): void
    {
        if ($tag === 'tempdoc') {
            return;
        }
        $this->wt_report_stack[] = $this->wt_report;
        $this->wt_report         = $this->report_root->createHTML($tag, $attrs);
        $this->current_element   = $this->wt_report;

        $this->print_data_stack[] = $this->print_data;
        $this->print_data         = true;
    }
71342
static function appendBottomReport( $reportName, $reportContent )
    {
        $debug = eZDebug::instance();
        $debug->bottomReportsList[$reportName] = $reportContent;
    }
162662
public void earlHtmlReport( String outputDir ) {
        ClassLoader cl = Thread.currentThread().getContextClassLoader();
        String resourceDir = cl.getResource( "com/occamlab/te/earl/lib" ).getPath();
        String earlXsl = cl.getResource( "com/occamlab/te/earl_html_report.xsl" ).toString();
        File htmlOutput = new File( outputDir, "result" );
        htmlOutput.mkdir();

        File earlResult = findEarlResultFile( outputDir );
        LOGR.log( FINE, "Try to transform earl result file '" + earlResult + "' to directory " + htmlOutput );

        try {
            if ( earlResult != null && earlResult.exists() ) {
                Transformer transformer = TransformerFactory.newInstance().newTransformer( new StreamSource( earlXsl ) );
                transformer.setParameter( "outputDir", htmlOutput );
                File indexHtml = new File( htmlOutput, "index.html" );
                indexHtml.createNewFile();

                // Fortify Mod: Make sure the FileOutputStream is closed when we are done with it.
                // transformer.transform( new StreamSource( earlResult ),
                // new StreamResult( new FileOutputStream( indexHtml ) ) );
                FileOutputStream fo = new FileOutputStream( indexHtml );
                transformer.transform( new StreamSource( earlResult ), new StreamResult( fo ) );
                fo.close();
                FileUtils.copyDirectory( new File( resourceDir ), htmlOutput );
            }
        } catch ( Exception e ) {
            LOGR.log( SEVERE, "Transformation of EARL to HTML failed.", e );
        }
    }