Download src/php/php-src/ext/dom/tests/DOM4_DOMNode_remove.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 505 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/dom/tests/DOM4_DOMNode_remove.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/dom/tests/DOM4_DOMNode_remove.phpt
-
curl -L -o DOM4_DOMNode_remove.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/dom/tests/DOM4_DOMNode_remove.phpt
505 Bytes
| --TEST-- | |
| DOMNode::remove() | |
| --EXTENSIONS-- | |
| dom | |
| --FILE-- | |
| require_once("dom_test.inc"); | |
| $dom = new DOMDocument; | |
| $dom->loadXML('<test><one>first</one><two>second</two></test>'); | |
| $element = $dom->documentElement; | |
| print_node($element->firstChild); | |
| $returnValue = $element->firstChild->remove(); | |
| print_node($element->firstChild); | |
| var_dump($returnValue); | |
| --EXPECT-- | |
| Node Name: one | |
| Node Type: 1 | |
| Num Children: 1 | |
| Node Content: first | |
| Node Name: two | |
| Node Type: 1 | |
| Num Children: 1 | |
| Node Content: second | |
| NULL | |