Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Uri\WhatWg\InvalidUrlException::__constructUri\WhatWg\UrlValidationError::__construct>
^URILast updated: Mon, 26 Oct 2026

The Uri\WhatWg\UrlValidationError class

(PHP 8 >= 8.5.0)

Introduction

Provides details about errors that were detected when parsing a URL with Uri\WhatWg\Url.

Class synopsis

namespace Uri\WhatWg;
final readonly class UrlValidationError {
/* Properties */
public string $context;
public bool $failure;
/* Methods */
public function __construct(string $context, Uri\WhatWg\UrlValidationErrorType $type, bool $failure)
}

Properties

context

The input URL at the point where the error was detected.

type

The type of error.

failure

If true the error caused the URL to be rejected as invalid. If false the error is a soft error that was automatically corrected during parsing.

Table of Contents


<Uri\WhatWg\InvalidUrlException::__constructUri\WhatWg\UrlValidationError::__construct>
^URILast updated: Mon, 26 Oct 2026