src/Dev/DebugView.php
public function renderSourceFragment($lines, $errline)
    {
        $output = '<div class="info"><h3>Source</h3>';
        $output .= '<pre>';
        foreach ($lines as $offset => $line) {
            $line = htmlentities($line, ENT_COMPAT, 'UTF-8');
            if ($offset == $errline) {
                $output .= "<span>$offset</span> <span class=\"error\">$line</span>";
            } else {
                $output .= "<span>$offset</span> $line";
            }
        }
        $output .= '</pre></div>';

        return $output;
    }
public function renderSourceFragment($lines, $errline)
    {
        $output = '<div class="info"><h3>Source</h3>';
        $output .= '<pre>';
        foreach ($lines as $offset => $line) {
            $line = htmlentities($line, ENT_COMPAT, 'UTF-8');
            if ($offset == $errline) {
                $output .= "<span>$offset</span> <span class=\"error\">$line</span>";
            } else {
                $output .= "<span>$offset</span> $line";
            }
        }
        $output .= '</pre></div>';

        return $output;
    }
public function renderSourceFragment ( $ lines , $ errline ) { $ output = '<div class="info"><h3>Source</h3>' ; $ output .= '<pre>' ; foreach ( $ lines as $ offset => $ line ) { $ line = htmlentities ( $ line , ENT_COMPAT , 'UTF-8' ) ; if ( $ offset == $ errline ) { $ output .= "<span>$offset</span> <span class=\"error\">$line</span>" ; } else { $ output .= "<span>$offset</span> $line" ; } } $ output .= '</pre></div>' ; return $ output ; }
Render a fragment of the a source file

@param array $lines An array of file lines; the keys should be the original line numbers
@param int $errline The line of the error
@return string
Render a fragment of the a source file