xref: /PHP-5.5/ext/simplexml/tests/032.phpt (revision 610c7fbe)
1--TEST--
2SimpleXML: comparing instances
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$xml =<<<EOF
8<people>
9  <person name="Joe"/>
10  <person name="John">
11    <children>
12      <person name="Joe"/>
13    </children>
14  </person>
15  <person name="Jane"/>
16</people>
17EOF;
18
19$xml1 =<<<EOF
20<people>
21  <person name="John">
22    <children>
23      <person name="Joe"/>
24    </children>
25  </person>
26  <person name="Jane"/>
27</people>
28EOF;
29
30
31$people = simplexml_load_string($xml);
32$people1 = simplexml_load_string($xml);
33$people2 = simplexml_load_string($xml1);
34
35var_dump($people1 == $people);
36var_dump($people2 == $people);
37var_dump($people2 == $people1);
38
39?>
40===DONE===
41--EXPECTF--
42bool(false)
43bool(false)
44bool(false)
45===DONE===
46