File tree Expand file tree Collapse file tree 3 files changed +63
-15
lines changed Expand file tree Collapse file tree 3 files changed +63
-15
lines changed Original file line number Diff line number Diff line change @@ -99,32 +99,46 @@ class XMLReader
99
99
public const int SUBST_ENTITIES = UNKNOWN ;
100
100
101
101
102
+ /** @virtual */
102
103
public int $ attributeCount ;
103
104
105
+ /** @virtual */
104
106
public string $ baseURI ;
105
107
108
+ /** @virtual */
106
109
public int $ depth ;
107
110
111
+ /** @virtual */
108
112
public bool $ hasAttributes ;
109
113
114
+ /** @virtual */
110
115
public bool $ hasValue ;
111
116
117
+ /** @virtual */
112
118
public bool $ isDefault ;
113
119
120
+ /** @virtual */
114
121
public bool $ isEmptyElement ;
115
122
123
+ /** @virtual */
116
124
public string $ localName ;
117
125
126
+ /** @virtual */
118
127
public string $ name ;
119
128
129
+ /** @virtual */
120
130
public string $ namespaceURI ;
121
131
132
+ /** @virtual */
122
133
public int $ nodeType ;
123
134
135
+ /** @virtual */
124
136
public string $ prefix ;
125
137
138
+ /** @virtual */
126
139
public string $ value ;
127
140
141
+ /** @virtual */
128
142
public string $ xmlLang ;
129
143
130
144
/** @tentative-return-type */
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ Virtual property tests
3
+ --EXTENSIONS--
4
+ xmlreader
5
+ --FILE--
6
+ <?php
7
+
8
+ $ rc = new ReflectionClass (XMLReader::class);
9
+ $ prop = $ rc ->getProperty ("nodeType " );
10
+ var_dump ($ prop ->isVirtual ());
11
+ var_dump ($ prop ->getSettableType ());
12
+ var_dump ($ prop ->getHooks ());
13
+ var_dump ($ prop ->getRawValue (new XMLReader ));
14
+ var_dump ($ prop ->getValue (new XMLReader ));
15
+
16
+ $ reader = XMLReader::XML ("<root>hi</root> " );
17
+ var_dump (json_encode ($ reader ));
18
+ var_export ($ reader ); echo "\n" ;
19
+ var_dump (get_object_vars ($ reader ));
20
+
21
+ ?>
22
+ --EXPECTF--
23
+ bool(true)
24
+ object(ReflectionNamedType)#%d (0) {
25
+ }
26
+ array(0) {
27
+ }
28
+ int(0)
29
+ int(0)
30
+ string(2) "{}"
31
+ \XMLReader::__set_state(array(
32
+ ))
33
+ array(0) {
34
+ }
You can’t perform that action at this time.
0 commit comments