1--TEST-- 2Bug #54138 - DOMNode::getLineNo() doesn't return line number higher than 65535 3--SKIPIF-- 4<?php 5if (!extension_loaded('dom')) die('skip dom extension not available'); 6if (LIBXML_VERSION >= 20900) die('skip this test is for libxml < 2.9.0 only'); 7?> 8--FILE-- 9<?php 10define('LIBXML_BIGLINES', 1<<22); 11$foos = str_repeat('<foo/>' . PHP_EOL, 65535); 12$xml = <<<XML 13<?xml version="1.0" encoding="UTF-8"?> 14<root> 15$foos 16<bar/> 17</root> 18XML; 19$dom = new DOMDocument(); 20$dom->loadXML($xml, LIBXML_BIGLINES); 21var_dump($dom->getElementsByTagName('bar')->item(0)->getLineNo()); 22?> 23--EXPECT-- 24int(65535) 25