Annotation of embedaddon/php/ext/simplexml/tests/bug66084_0.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #66084 simplexml_load_string() mangles empty node name, var_dump variant
3: --SKIPIF--
4: <?php if (!extension_loaded("simplexml")) print "skip simplexml not available"; ?>
5: --FILE--
6: <?php
7: echo var_dump(simplexml_load_string('<a><b/><c><x/></c></a>')), "\n";
8: echo var_dump(simplexml_load_string('<a><b/><d/><c><x/></c></a>')), "\n";
9: echo var_dump(simplexml_load_string('<a><b/><c><d/><x/></c></a>')), "\n";
10: echo var_dump(simplexml_load_string('<a><b/><c><d><x/></d></c></a>')), "\n";
11: ?>
12: --EXPECT--
13: object(SimpleXMLElement)#1 (2) {
14: ["b"]=>
15: object(SimpleXMLElement)#2 (0) {
16: }
17: ["c"]=>
18: object(SimpleXMLElement)#3 (1) {
19: ["x"]=>
20: object(SimpleXMLElement)#4 (0) {
21: }
22: }
23: }
24:
25: object(SimpleXMLElement)#1 (3) {
26: ["b"]=>
27: object(SimpleXMLElement)#3 (0) {
28: }
29: ["d"]=>
30: object(SimpleXMLElement)#2 (0) {
31: }
32: ["c"]=>
33: object(SimpleXMLElement)#4 (1) {
34: ["x"]=>
35: object(SimpleXMLElement)#5 (0) {
36: }
37: }
38: }
39:
40: object(SimpleXMLElement)#1 (2) {
41: ["b"]=>
42: object(SimpleXMLElement)#4 (0) {
43: }
44: ["c"]=>
45: object(SimpleXMLElement)#2 (2) {
46: ["d"]=>
47: object(SimpleXMLElement)#3 (0) {
48: }
49: ["x"]=>
50: object(SimpleXMLElement)#5 (0) {
51: }
52: }
53: }
54:
55: object(SimpleXMLElement)#1 (2) {
56: ["b"]=>
57: object(SimpleXMLElement)#2 (0) {
58: }
59: ["c"]=>
60: object(SimpleXMLElement)#4 (1) {
61: ["d"]=>
62: object(SimpleXMLElement)#5 (1) {
63: ["x"]=>
64: object(SimpleXMLElement)#3 (0) {
65: }
66: }
67: }
68: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>