bug67116.phpt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. --TEST--
  2. Bug #67116 (Inconsistent parsing of Nodes w/o linefeed)
  3. --EXTENSIONS--
  4. simplexml
  5. --FILE--
  6. <?php
  7. $xml = <<<XML
  8. <?xml version="1.0" encoding="UTF-8"?>
  9. <aa>
  10. <bs>
  11. <b>b</b>
  12. </bs>
  13. <cs><c>b</c></cs>
  14. <ds><d id="d"></d></ds>
  15. <es>
  16. <e id="e"></e>
  17. </es>
  18. <fs><f id="f"></f><f id="f"></f></fs>
  19. </aa>
  20. XML;
  21. $sxe = simplexml_load_string($xml);
  22. print_r($sxe);
  23. ?>
  24. --EXPECT--
  25. SimpleXMLElement Object
  26. (
  27. [bs] => SimpleXMLElement Object
  28. (
  29. [b] => b
  30. )
  31. [cs] => SimpleXMLElement Object
  32. (
  33. [c] => b
  34. )
  35. [ds] => SimpleXMLElement Object
  36. (
  37. [d] => SimpleXMLElement Object
  38. (
  39. [@attributes] => Array
  40. (
  41. [id] => d
  42. )
  43. )
  44. )
  45. [es] => SimpleXMLElement Object
  46. (
  47. [e] => SimpleXMLElement Object
  48. (
  49. [@attributes] => Array
  50. (
  51. [id] => e
  52. )
  53. )
  54. )
  55. [fs] => SimpleXMLElement Object
  56. (
  57. [f] => Array
  58. (
  59. [0] => SimpleXMLElement Object
  60. (
  61. [@attributes] => Array
  62. (
  63. [id] => f
  64. )
  65. )
  66. [1] => SimpleXMLElement Object
  67. (
  68. [@attributes] => Array
  69. (
  70. [id] => f
  71. )
  72. )
  73. )
  74. )
  75. )