xref: /PHP-8.0/ext/simplexml/tests/bug26976.phpt (revision 21d5052f)
1--TEST--
2Bug #26976 (Can not access array elements using array indices)
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?>
5--FILE--
6<?php
7
8$root = simplexml_load_string(
9'<?xml version="1.0"?>
10<root>
11 <child>a</child>
12 <child>b</child>
13 <child>c</child>
14 <child>d</child>
15</root>
16');
17
18echo $root->child[0], "\n";
19echo $root->child[1], "\n";
20echo $root->child[2], "\n";
21echo $root->child[3], "\n";
22
23?>
24--EXPECT--
25a
26b
27c
28d
29