Mecha CMS

$u_r_l->host()

Return the URL host if any, otherwise return null.

2.2.0

$u_r_l->host(void);

Example:

$url = new URL('https://mecha-cms.com/foo/bar/1?baz=qux#asdf', '/foo');

echo $url->host;

Result:

127.0.0.1