Download src/php/php-src/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 366 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt
-
curl -L -o SimpleXMLElement_addAttribute_basic.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/SimpleXMLElement_addAttribute_basic.phpt
366 Bytes
| --TEST-- | |
| SimpleXMLElement->addAttribute() | |
| --EXTENSIONS-- | |
| simplexml | |
| --FILE-- | |
| $simple = simplexml_load_file(__DIR__."/book.xml"); | |
| $simple->addAttribute('type','novels'); | |
| var_dump($simple->attributes()); | |
| echo "Done"; | |
| --EXPECT-- | |
| object(SimpleXMLElement)#2 (1) { | |
| ["@attributes"]=> | |
| array(1) { | |
| ["type"]=> | |
| string(6) "novels" | |
| } | |
| } | |
| Done | |