Statement on glibc/iconv Vulnerability

DOMCharacterData::remove

(PHP 8)

DOMCharacterData::removeRemoves the character data

Beschreibung

public DOMCharacterData::remove(): void

Removes the character data.

Parameter-Liste

Diese Funktion besitzt keine Parameter.

Rückgabewerte

Es wird kein Wert zurückgegeben.

Beispiele

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

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