Download src/php/php-src/ext/dom/tests/bug79701/toggle.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 531 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/dom/tests/bug79701/toggle.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/dom/tests/bug79701/toggle.phpt
-
curl -L -o toggle.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/dom/tests/bug79701/toggle.phpt
531 Bytes
| --TEST-- | |
| Bug #79701 (getElementById does not correctly work with duplicate definitions) - toggle variation | |
| --EXTENSIONS-- | |
| dom | |
| --FILE-- | |
| $dom = Dom\HTMLDocument::createFromString('<p id="test">foo</p>', LIBXML_NOERROR | LIBXML_HTML_NOIMPLIED); | |
| var_dump($dom->getElementById('test')?->nodeName); | |
| $dom->documentElement->toggleAttribute('id'); | |
| var_dump($dom->getElementById('test')?->nodeName); | |
| $dom->documentElement->toggleAttribute('id'); | |
| var_dump($dom->getElementById('test')?->nodeName); | |
| --EXPECT-- | |
| string(1) "P" | |
| NULL | |
| NULL | |