Embryo/Http/Message/Uri.php
public function withHost($host)
        {
            if(!is_string($host)){
                throw new InvalidArgumentException('Uri host must be a string');
            }

            $clone = clone $this;
            $clone->host = $this->removePortFromHost($host);
            return $clone;
        }
public function withHost($host)
        {
            if(!is_string($host)){
                throw new InvalidArgumentException('Uri host must be a string');
            }

            $clone = clone $this;
            $clone->host = $this->removePortFromHost($host);
            return $clone;
        }
public function withHost ( $ host ) { if ( ! is_string ( $ host ) ) { throw new InvalidArgumentException ( 'Uri host must be a string' ) ; } $ clone = clone $ this ; $ clone -> host = $ this -> removePortFromHost ( $ host ) ; return $ clone ; }
Returns an instance with the specified host.

@param string $host
@return static
@throws InvalidArgumentException
Returns an instance with the specified host .