1--TEST--
2TokenList: iteration 02
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = DOM\XMLDocument::createFromString('<root class="A B C D E F"/>');
9$list = $dom->documentElement->classList;
10
11foreach ($list as $i => $item) {
12    var_dump($i, $item);
13    echo "==========\n";
14    foreach ($list as $i2 => $item2) {
15        var_dump($i2, $item2);
16    }
17    echo "==========\n";
18}
19
20?>
21--EXPECT--
22int(0)
23string(1) "A"
24==========
25int(0)
26string(1) "A"
27int(1)
28string(1) "B"
29int(2)
30string(1) "C"
31int(3)
32string(1) "D"
33int(4)
34string(1) "E"
35int(5)
36string(1) "F"
37==========
38int(1)
39string(1) "B"
40==========
41int(0)
42string(1) "A"
43int(1)
44string(1) "B"
45int(2)
46string(1) "C"
47int(3)
48string(1) "D"
49int(4)
50string(1) "E"
51int(5)
52string(1) "F"
53==========
54int(2)
55string(1) "C"
56==========
57int(0)
58string(1) "A"
59int(1)
60string(1) "B"
61int(2)
62string(1) "C"
63int(3)
64string(1) "D"
65int(4)
66string(1) "E"
67int(5)
68string(1) "F"
69==========
70int(3)
71string(1) "D"
72==========
73int(0)
74string(1) "A"
75int(1)
76string(1) "B"
77int(2)
78string(1) "C"
79int(3)
80string(1) "D"
81int(4)
82string(1) "E"
83int(5)
84string(1) "F"
85==========
86int(4)
87string(1) "E"
88==========
89int(0)
90string(1) "A"
91int(1)
92string(1) "B"
93int(2)
94string(1) "C"
95int(3)
96string(1) "D"
97int(4)
98string(1) "E"
99int(5)
100string(1) "F"
101==========
102int(5)
103string(1) "F"
104==========
105int(0)
106string(1) "A"
107int(1)
108string(1) "B"
109int(2)
110string(1) "C"
111int(3)
112string(1) "D"
113int(4)
114string(1) "E"
115int(5)
116string(1) "F"
117==========
118