1--TEST--
2HTMLCollection::namedItem() and dimension handling for named accesses
3--EXTENSIONS--
4dom
5--FILE--
6<?php
7
8$dom = Dom\XMLDocument::createFromString('<root/>');
9
10try {
11    $dom->getElementsByTagName('root')[][1] = 1;
12} catch (Error $e) {
13    echo $e->getMessage(), "\n";
14}
15
16try {
17    $dom->getElementsByTagName('root')[true];
18} catch (Error $e) {
19    echo $e->getMessage(), "\n";
20}
21
22try {
23    isset($dom->getElementsByTagName('root')[true]);
24} catch (Error $e) {
25    echo $e->getMessage(), "\n";
26}
27
28?>
29--EXPECT--
30Cannot append to Dom\HTMLCollection
31Cannot access offset of type bool on Dom\HTMLCollection
32Cannot access offset of type bool in isset or empty
33