xref: /PHP-5.4/ext/simplexml/tests/035.phpt (revision 57b8e839)
1--TEST--
2SimpleXML: __toString
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$string = '<?xml version="1.0"?>
8<foo><bar>
9   <p>Blah 1</p>
10   <p>Blah 2</p>
11   <p>Blah 3</p>
12   <tt>Blah 4</tt>
13</bar></foo>
14';
15$foo = simplexml_load_string($string);
16$p = $foo->bar->p;
17echo $p."\n";
18echo $p->__toString()."\n";
19echo $p."\n";
20?>
21==Done==
22--EXPECT--
23Blah 1
24Blah 1
25Blah 1
26==Done==
27