simplexml_load_file.phpt 567 B

1234567891011121314151617181920212223242526272829303132
  1. --TEST--
  2. simplexml_load_file()
  3. --EXTENSIONS--
  4. simplexml
  5. --FILE--
  6. <?php
  7. $simple = simplexml_load_file(__DIR__."/book.xml");
  8. var_dump($simple);
  9. echo "Done";
  10. ?>
  11. --EXPECT--
  12. object(SimpleXMLElement)#1 (1) {
  13. ["book"]=>
  14. array(2) {
  15. [0]=>
  16. object(SimpleXMLElement)#2 (2) {
  17. ["title"]=>
  18. string(19) "The Grapes of Wrath"
  19. ["author"]=>
  20. string(14) "John Steinbeck"
  21. }
  22. [1]=>
  23. object(SimpleXMLElement)#3 (2) {
  24. ["title"]=>
  25. string(9) "The Pearl"
  26. ["author"]=>
  27. string(14) "John Steinbeck"
  28. }
  29. }
  30. }
  31. Done