Download src/php/php-src/ext/simplexml/tests/020.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 324 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/020.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/simplexml/tests/020.phpt
-
curl -L -o 020.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/020.phpt
324 Bytes
| --TEST-- | |
| SimpleXML: Attribute compared to string | |
| --EXTENSIONS-- | |
| simplexml | |
| --FILE-- | |
| $doc = simplexml_load_string('<root><name attr="foo">bar</name></root>'); | |
| print $doc->name["attr"]; | |
| print "\n"; | |
| if ($doc->name["attr"] == "foo") { | |
| print "Works\n"; | |
| } else { | |
| print "Error\n"; | |
| } | |
| --EXPECT-- | |
| foo | |
| Works | |