summaryrefslogtreecommitdiff
path: root/ext/simplexml/tests/bug26976.phpt
blob: 657c229737d795812f71c4ce2957e8355784545d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--TEST--
Bug #26976 (Can not access array elements using array indices)
--SKIPIF--
<?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?>
--FILE--
<?php

$root = simplexml_load_string(
'<?xml version="1.0"?>
<root>
 <child>a</child>
 <child>b</child>
 <child>c</child>
 <child>d</child>
</root>
');

echo $root->child[0], "\n";
echo $root->child[1], "\n";
echo $root->child[2], "\n";
echo $root->child[3], "\n";

?>
--EXPECT--
a
b
c
d