# La classe Dom\Comment

(PHP 8 >= 8.4.0)

## Introduction

Représente un nœud de commentaire, délimité par `<!--` et `-->`.

Ceci est l'équivalent moderne et conforme aux spécifications de DOMComment.

## Synopsis de la classe

class Dom\Comment extends Dom\CharacterData {
/* Constantes héritées */
public const int Dom\Node::DOCUMENT_POSITION_DISCONNECTED = 0x1;
public const int Dom\Node::DOCUMENT_POSITION_PRECEDING = 0x2;
public const int Dom\Node::DOCUMENT_POSITION_FOLLOWING = 0x4;
public const int Dom\Node::DOCUMENT_POSITION_CONTAINS = 0x8;
public const int Dom\Node::DOCUMENT_POSITION_CONTAINED_BY = 0x10;
public const int Dom\Node::DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = 0x20;
/* Propriétés héritées */
public readonly ?Dom\Element $previousElementSibling;
public readonly ?Dom\Element $nextElementSibling;
public string $data;
public readonly int $length;
public readonly int $nodeType;
public readonly string $nodeName;
public readonly string $baseURI;
public readonly bool $isConnected;
public readonly ?Dom\Document $ownerDocument;
public readonly ?Dom\Node $parentNode;
public readonly ?Dom\Element $parentElement;
public readonly Dom\NodeList $childNodes;
public readonly ?Dom\Node $firstChild;
public readonly ?Dom\Node $lastChild;
public readonly ?Dom\Node $previousSibling;
public readonly ?Dom\Node $nextSibling;
public ?string $nodeValue;
public ?string $textContent;
/* Méthodes héritées */
public function Dom\CharacterData::after(Dom\Node|string `...$nodes`): void
public function Dom\CharacterData::appendData(string `$data`): void
public function Dom\CharacterData::before(Dom\Node|string `...$nodes`): void
public function Dom\CharacterData::deleteData(int `$offset`, int `$count`): void
public function Dom\CharacterData::insertData(int `$offset`, string `$data`): void
public function Dom\CharacterData::remove(): void
public function Dom\CharacterData::replaceData(int `$offset`, int `$count`, string `$data`): void
public function Dom\CharacterData::replaceWith(Dom\Node|string `...$nodes`): void
public function Dom\CharacterData::substringData(int `$offset`, int `$count`): string
/* Pas encore documenté */
}

## Voir aussi

- » Spécification WHATWG de Comment

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open