bug26976.phpt 394 B

12345678910111213141516171819202122232425262728
  1. --TEST--
  2. Bug #26976 (Can not access array elements using array indices)
  3. --EXTENSIONS--
  4. simplexml
  5. --FILE--
  6. <?php
  7. $root = simplexml_load_string(
  8. '<?xml version="1.0"?>
  9. <root>
  10. <child>a</child>
  11. <child>b</child>
  12. <child>c</child>
  13. <child>d</child>
  14. </root>
  15. ');
  16. echo $root->child[0], "\n";
  17. echo $root->child[1], "\n";
  18. echo $root->child[2], "\n";
  19. echo $root->child[3], "\n";
  20. ?>
  21. --EXPECT--
  22. a
  23. b
  24. c
  25. d