Uri\WhatWg\Url::__construct
(PHP 8 >= 8.5.0)
Construct the Url object
Description
Constructs the Uri\WhatWg\Url object.
Parameters
uriA URL string to parse, for instance
https://example.com/foo. A relative-URL string such as/foois only accepted whenbaseUrlis given.baseUrlWhen a String is passed,
uriis applied onbaseUrl, ifuriis a relative-URL string. If either null is passed, oruriis a not a relative-URL string, thenbaseUrldoesn't have any effect.softErrorsAn Array to pass a list of
Uri\WhatWg\UrlValidationErrorinstances by reference to provide extended information about the errors triggered during parsing.
Errors/Exceptions InvalidUrlException
See Also
Uri\WhatWg\Url::parseUri\WhatWg\Url::resolveUri\Rfc3986\Uri::__construct