Statement on glibc/iconv Vulnerability

DOMElement::remove

(PHP 8)

DOMElement::removeRemoves the element

Descripción

public DOMElement::remove(): void

Removes the element.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

No devuelve ningún valor.

Ejemplos

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

El resultado del ejemplo sería:

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

Ver también

add a note

User Contributed Notes

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