Statement on glibc/iconv Vulnerability

DOMCharacterData::remove

(PHP 8)

DOMCharacterData::removeRemoves the character data

Descrizione

public DOMCharacterData::remove(): void

Removes the character data.

Elenco dei parametri

Questa funzione non contiene parametri.

Valori restituiti

Nessun valore viene restituito.

Esempi

Example #1 DOMCharacterData::remove() example

Removes the character data.

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

$cdata->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