Download src/php/php-src/ext/simplexml/tests/023.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 587 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/023.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/simplexml/tests/023.phpt
-
curl -L -o 023.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/023.phpt
587 Bytes
| --TEST-- | |
| SimpleXML: Attributes with entities | |
| --EXTENSIONS-- | |
| simplexml | |
| --FILE-- | |
| $xml =<<<EOF | |
| <?xml version='1.0'?> | |
| ]> | |
| <root attr='foo bar baz'></root> | |
| EOF; | |
| $sxe = simplexml_load_string($xml); | |
| var_dump($sxe); | |
| var_dump($sxe['attr']); | |
| ?> | |
| --EXPECTF-- | |
| object(SimpleXMLElement)#%d (1) { | |
| ["@attributes"]=> | |
| array(1) { | |
| ["attr"]=> | |
| string(%d) "foo%sbar%sbaz" | |
| } | |
| } | |
| object(SimpleXMLElement)#%d (1) { | |
| [0]=> | |
| string(%d) "foo%sbar%sbaz" | |
| } | |