array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'it', ), 'this' => array ( 0 => 'uri-whatwg-url.construct.php', 1 => 'Uri\\WhatWg\\Url::__construct', 2 => 'Construct the Url object', ), 'up' => array ( 0 => 'class.uri-whatwg-url.php', 1 => 'Uri\\WhatWg\\Url', ), 'prev' => array ( 0 => 'class.uri-whatwg-url.php', 1 => 'Uri\\WhatWg\\Url', ), 'next' => array ( 0 => 'uri-whatwg-url.debuginfo.php', 1 => 'Uri\\WhatWg\\Url::__debugInfo', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/uri/uri/whatwg/url/construct.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(PHP 8 >= 8.5.0)
Uri\WhatWg\Url::__construct — Construct the Url object
$uri, ?Uri\WhatWg\Url $baseUrl = null, array &$softErrors = null)Constructs the Uri\Rfc3986\Uri object.
uri/foo or (e.g. https://example.com/foo).
baseUrluri is applied on
baseUrl, if uri is a relative-URL string.
If either null is passed, or uri is a not a relative-URL string, then
baseUrl doesn't have any effect.
softErrorsIf the resulting URL is invalid, a Uri\WhatWg\InvalidUrlException is thrown.