W3cubDocs

/PHP

The Dom\NamespaceInfo class

Introduction

(PHP 8 >= 8.4.0)

This represents immutable information about namespaces of an element. This decouples namespaces from attributes, which was incorrectly intertwined for the old DOM classes.

Class synopsis

final readonly class Dom\NamespaceInfo {
/* Properties */
public ?string $prefix;
}

Properties

prefix
The namespace prefix of the attribute.
namespaceURI
The namespace URI of the attribute.
element
The element that this namespace information is about.

© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.dom-namespaceinfo.php