src/PhpDocument.php
public function getRange(Range $range)
    {
        $content = $this->getContent();
        $start = $range->start->toOffset($content);
        $length = $range->end->toOffset($content) - $start;
        return substr($content, $start, $length);
    }
public function getRange(Range $range)
    {
        $content = $this->getContent();
        $start = $range->start->toOffset($content);
        $length = $range->end->toOffset($content) - $start;
        return substr($content, $start, $length);
    }
public function getRange ( Range $ range ) { $ content = $ this -> getContent ( ) ; $ start = $ range -> start -> toOffset ( $ content ) ; $ length = $ range -> end -> toOffset ( $ content ) - $ start ; return substr ( $ content , $ start , $ length ) ; }
Returns a range of the content

@param Range $range
@return string|null
Returns a range of the content