Statement on glibc/iconv Vulnerability

DOMElement::remove

(PHP 8)

DOMElement::removeRemove o elemento

Descrição

public DOMElement::remove(): void

Remove o elemento.

Parâmetros

Esta função não possui parâmetros.

Valor Retornado

Nenhum valor é retornado.

Exemplos

Exemplo #1 DOMElement::remove() exemplo

Remove o elemento.

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

$hello->remove();

echo
$doc->saveXML();
?>

O exemplo acima produzirá:

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

Veja Também

add a note

User Contributed Notes

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