Statement on glibc/iconv Vulnerability

DOMCharacterData::remove

(PHP 8)

DOMCharacterData::removeRemoves the character data

Descripción

public DOMCharacterData::remove(): void

Removes the character data.

Parámetros

Esta función no tiene parámetros.

Valores devueltos

No devuelve ningún valor.

Ejemplos

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

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