src/Highlighter.php
public function highlight(string $source): string
    {
        $result = '';
        $previous = [];
        foreach ($this->getTokens($source) as $token) {
            $result .= $this->r->token($token, $previous);
            $previous = $token;
        }

        return $result;
    }
public function highlight(string $source): string
    {
        $result = '';
        $previous = [];
        foreach ($this->getTokens($source) as $token) {
            $result .= $this->r->token($token, $previous);
            $previous = $token;
        }

        return $result;
    }
public function highlight ( string $ source ) : string { $ result = '' ; $ previous = [ ] ; foreach ( $ this -> getTokens ( $ source ) as $ token ) { $ result .= $ this -> r -> token ( $ token , $ previous ) ; $ previous = $ token ; } return $ result ; }
Returns highlighted PHP source.

@param string $source
@return string
Returns highlighted PHP source .