original_string: public function toString()
      {
          $result = "";
          if ($this->scheme) {
              $result .= $this->scheme.'://';
          }
          if ($this->user) {
              $result .= $this->user;
              if ($this->pass) {
                  $result .= $this->user;
              }
              $result .= '@';
          }
          if ($this->host) {
              $result .= $this->host;
          }
          if ($this->port) {
              $result .= ':'.$this->port;
          }
          if ($this->pathSegments) {
              $result .= '/'.implode('/', $this->pathSegments);
          }
          if ($this->parameters) {
              $result .= '?'.http_build_query($this->parameters);
          }
          if ($this->fragment) {
              $result .= '#'.$this->fragment;
          }
          return $result;
      }
code: public function toString()
      {
          $result = "";
          if ($this->scheme) {
              $result .= $this->scheme.'://';
          }
          if ($this->user) {
              $result .= $this->user;
              if ($this->pass) {
                  $result .= $this->user;
              }
              $result .= '@';
          }
          if ($this->host) {
              $result .= $this->host;
          }
          if ($this->port) {
              $result .= ':'.$this->port;
          }
          if ($this->pathSegments) {
              $result .= '/'.implode('/', $this->pathSegments);
          }
          if ($this->parameters) {
              $result .= '?'.http_build_query($this->parameters);
          }
          if ($this->fragment) {
              $result .= '#'.$this->fragment;
          }
          return $result;
      }
code_tokens: public function toString ( ) { $ result = "" ; if ( $ this -> scheme ) { $ result .= $ this -> scheme . '://' ; } if ( $ this -> user ) { $ result .= $ this -> user ; if ( $ this -> pass ) { $ result .= $ this -> user ; } $ result .= '@' ; } if ( $ this -> host ) { $ result .= $ this -> host ; } if ( $ this -> port ) { $ result .= ':' . $ this -> port ; } if ( $ this -> pathSegments ) { $ result .= '/' . implode ( '/' , $ this -> pathSegments ) ; } if ( $ this -> parameters ) { $ result .= '?' . http_build_query ( $ this -> parameters ) ; } if ( $ this -> fragment ) { $ result .= '#' . $ this -> fragment ; } return $ result ; }
docstring: Gets the current URL as a string
  
  @return string The resulting URL as a string
docstring_tokens: Gets the current URL as a string