xref: /PHP-7.2/ext/simplexml/tests/001.phpt (revision 17ccbeec)
1--TEST--
2SimpleXML: Simple document
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7
8var_dump(simplexml_load_file(dirname(__FILE__).'/sxe.xml'));
9
10?>
11===DONE===
12--EXPECTF--
13object(SimpleXMLElement)#%d (2) {
14  ["@attributes"]=>
15  array(1) {
16    ["id"]=>
17    string(5) "elem1"
18  }
19  ["elem1"]=>
20  object(SimpleXMLElement)#%d (3) {
21    ["@attributes"]=>
22    array(1) {
23      ["attr1"]=>
24      string(5) "first"
25    }
26    ["comment"]=>
27    object(SimpleXMLElement)#%d (0) {
28    }
29    ["elem2"]=>
30    object(SimpleXMLElement)#%d (1) {
31      ["elem3"]=>
32      object(SimpleXMLElement)#%d (1) {
33        ["elem4"]=>
34        object(SimpleXMLElement)#%d (1) {
35          ["test"]=>
36          object(SimpleXMLElement)#%d (0) {
37          }
38        }
39      }
40    }
41  }
42}
43===DONE===
44