2004-01-21 03:17:07 +00:00
|
|
|
--TEST--
|
2004-01-21 03:18:13 +00:00
|
|
|
Bug #26976 (Can not access array elements using array indices)
|
2004-01-21 03:17:07 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php if (!extension_loaded("simplexml")) print "skip simplexml extension is not loaded"; ?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
|
|
|
|
|
|
|
$root = simplexml_load_string(
|
2006-08-08 20:52:45 +00:00
|
|
|
b'<?xml version="1.0"?>
|
2004-01-21 03:17:07 +00:00
|
|
|
<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
|