blob: 19602f01035dcc3888fa22e67636ec1c7472d4c6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
--TEST--
Bug #42139 (XMLReader option constants are broken using XML())
--SKIPIF--
<?php if (!extension_loaded("xmlreader")) print "skip";
if (LIBXML_VERSION < 20628) die("skip: libxml2 2.6.28+ required");
?>
--FILE--
<?php
$xml = <<<XML
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE root [
<!ELEMENT root ANY>
<!ENTITY x "y">
]>
<root>&x;</root>
XML;
$reader = new XMLReader;
$reader->XML( $xml, NULL, LIBXML_NOENT);
while ( $reader->read() ) {
echo "{$reader->nodeType}, {$reader->name}, {$reader->value}\n";
}
$reader->close();
?>
--EXPECT--
10, root,
1, root,
3, #text, y
15, root,
|