Download src/php/php-src/ext/libxml/tests/bug76777.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/libxml/tests/bug76777.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/libxml/tests/bug76777.phpt
-
curl -L -o bug76777.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/libxml/tests/bug76777.phpt
769 Bytes
| --TEST-- | |
| Bug #76777 (first parameter of libxml_set_external_entity_loader callback undefined) | |
| --EXTENSIONS-- | |
| libxml | |
| dom | |
| --SKIPIF-- | |
| if (getenv("SKIP_ONLINE_TESTS")) die('skip online test'); | |
| --FILE-- | |
| $xml=<<<EOF | |
| <?xml version="1.0"?> | |
| <test/> | |
| EOF; | |
| $xsd=<<<EOF | |
| <?xml version="1.0"?> | |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
| <xs:include schemaLocation="nonexistent.xsd"/> | |
| <xs:element name="test"/> | |
| </xs:schema> | |
| EOF; | |
| libxml_set_external_entity_loader(function($p,$s,$c) { | |
| var_dump($p,$s,$c); | |
| die(); | |
| }); | |
| $dom=new DOMDocument($xml); | |
| $dom->schemaValidateSource($xsd); | |
| --EXPECT-- | |
| NULL | |
| string(15) "nonexistent.xsd" | |
| array(4) { | |
| ["directory"]=> | |
| NULL | |
| ["intSubName"]=> | |
| NULL | |
| ["extSubURI"]=> | |
| NULL | |
| ["extSubSystem"]=> | |
| NULL | |
| } | |