1--TEST--
2TokenList: item
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = DOM\XMLDocument::createFromString('<root class="A B C"/>');
9$list = $dom->documentElement->classList;
10
11foreach (range(-1, 3) as $i) {
12    var_dump($list->item($i));
13}
14
15echo "---\n";
16
17$list->value = 'D';
18var_dump($list->item(0));
19var_dump($list->item(1));
20
21?>
22--EXPECT--
23NULL
24string(1) "A"
25string(1) "B"
26string(1) "C"
27NULL
28---
29string(1) "D"
30NULL
31