Download src/php/php-src/ext/simplexml/tests/021.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 336 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/021.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/simplexml/tests/021.phpt
-
curl -L -o 021.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/simplexml/tests/021.phpt
336 Bytes
| --TEST-- | |
| SimpleXML: Element check | |
| --EXTENSIONS-- | |
| simplexml | |
| --FILE-- | |
| $ok = 1; | |
| $doc = simplexml_load_string('<root><exists>foo</exists></root>'); | |
| if(!isset($doc->exists)) { | |
| $ok *= 0; | |
| } | |
| if(isset($doc->doesnotexist)) { | |
| $ok *= 0; | |
| } | |
| if ($ok) { | |
| print "Works\n"; | |
| } else { | |
| print "Error\n"; | |
| } | |
| --EXPECT-- | |
| Works | |