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