Download src/php/php-src/ext/dom/tests/bug79701/node.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 484 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/dom/tests/bug79701/node.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/dom/tests/bug79701/node.phpt
-
curl -L -o node.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/dom/tests/bug79701/node.phpt
484 Bytes
| --TEST-- | |
| Bug #79701 (getElementById does not correctly work with duplicate definitions) - attribute node variation | |
| --EXTENSIONS-- | |
| dom | |
| --FILE-- | |
| $dom = Dom\HTMLDocument::createEmpty(); | |
| $element = $dom->createElement('foo'); | |
| $dom->append($element); | |
| $attr = $dom->createAttribute('id'); | |
| $attr->value = 'test'; | |
| var_dump($dom->getElementById('test')?->nodeName); | |
| $element->setAttributeNode($attr); | |
| var_dump($dom->getElementById('test')?->nodeName); | |
| --EXPECT-- | |
| NULL | |
| string(3) "FOO" | |