Statement on glibc/iconv Vulnerability

DOMElement::remove

(PHP 8)

DOMElement::removeRemoves the element

Descrizione

public DOMElement::remove(): void

Removes the element.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Nessun valore viene restituito.

Esempi

Example #1 DOMElement::remove() example

Removes the element.

<?php
$doc
= new DOMDocument;
$doc->loadXML("<container><hello/><world/></container>");
$hello = $doc->documentElement->firstChild;

$hello->remove();

echo
$doc->saveXML();
?>

Il precedente esempio visualizzerà:

<?xml version="1.0"?>
<container><world/></container>

Vedere anche:

add a note

User Contributed Notes

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