Statement on glibc/iconv Vulnerability

DOMElement::remove

(PHP 8)

DOMElement::removeRemoves the element

Beschreibung

public DOMElement::remove(): void

Removes the element.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

Beispiel #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();
?>

Das oben gezeigte Beispiel erzeugt folgende Ausgabe:

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

Siehe auch

add a note

User Contributed Notes

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