Download src/php/php-src/ext/simplexml/tests/016a.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 441 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/016a.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/simplexml/tests/016a.phpt
-
curl -L -o 016a.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/016a.phpt
441 Bytes
| --TEST-- | |
| SimpleXML: concatenating attributes | |
| --EXTENSIONS-- | |
| simplexml | |
| --FILE-- | |
| $xml =<<<EOF | |
| <people> | |
| <person name="Foo"></person> | |
| </people> | |
| EOF; | |
| $people = simplexml_load_string($xml); | |
| var_dump($people->person['name']); | |
| $people->person['name'] .= 'Bar'; | |
| var_dump($people->person['name']); | |
| --EXPECTF-- | |
| object(SimpleXMLElement)#%d (1) { | |
| [0]=> | |
| string(3) "Foo" | |
| } | |
| object(SimpleXMLElement)#%d (1) { | |
| [0]=> | |
| string(6) "FooBar" | |
| } | |