Download src/php/php-src/ext/libxml/tests/bug54138.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 512 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/libxml/tests/bug54138.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/libxml/tests/bug54138.phpt
-
curl -L -o bug54138.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/libxml/tests/bug54138.phpt
512 Bytes
| --TEST-- | |
| Bug #54138 - DOMNode::getLineNo() doesn't return line number higher than 65535 | |
| --EXTENSIONS-- | |
| dom | |
| --SKIPIF-- | |
| if (!defined('LIBXML_BIGLINES')) die('skip this test requires LIBXML_BIGLINES'); | |
| --FILE-- | |
| $foos = str_repeat('<foo/>' . PHP_EOL, 65535); | |
| $xml = <<<XML | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <root> | |
| $foos | |
| <bar/> | |
| </root> | |
| XML; | |
| $dom = new DOMDocument(); | |
| $dom->loadXML($xml, LIBXML_BIGLINES); | |
| var_dump($dom->getElementsByTagName('bar')->item(0)->getLineNo()); | |
| --EXPECT-- | |
| int(65540) | |