public function peek(): string
    {
        if ($this->atEnd()) {
            return self::END;
        }

        return $this->input[$this->index];
    }
public function peek(): string
    {
        if ($this->atEnd()) {
            return self::END;
        }

        return $this->input[$this->index];
    }
public function peek ( ) : string { if ( $ this -> atEnd ( ) ) { return self :: END ; } return $ this -> input [ $ this -> index ] ; }
Returns the next character without removing it from the input.

@return string
Returns the next character without removing it from the input .