DOMNode::getRootNode

(PHP 8 >= 8.3.0)

DOMNode::getRootNodeGet root node

Descrizione

public DOMNode::getRootNode(array $options = null): DOMNode

Get root node.

Elenco dei parametri

options

This parameter has no effect yet.

Valori restituiti

Returns the root node.

Esempi

Example #1 DOMNode::getRootNode() example

<?php

$dom
= new DOMDocument();
$dom->loadXML('<?xml version="1.0"?><html><body/></html>');

var_dump($dom->documentElement->firstElementChild->getRootNode() === $dom);
?>

Il precedente esempio visualizzerĂ :

bool(true)
add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top