xref: /PHP-8.3/ext/xmlreader/tests/bug42139.phpt (revision 74859783)
1--TEST--
2Bug #42139 (XMLReader option constants are broken using XML())
3--EXTENSIONS--
4xmlreader
5--FILE--
6<?php
7
8$xml = <<<XML
9<?xml version="1.0" encoding="utf-8"?>
10<!DOCTYPE root [
11<!ELEMENT root ANY>
12<!ENTITY x "y">
13]>
14<root>&x;</root>
15XML;
16
17$reader = new XMLReader;
18$reader->XML( $xml, NULL, LIBXML_NOENT);
19while ( $reader->read() ) {
20  echo "{$reader->nodeType}, {$reader->name}, {$reader->value}\n";
21}
22$reader->close();
23
24?>
25--EXPECT--
2610, root,
271, root,
283, #text, y
2915, root,
30