xref: /PHP-8.2/ext/simplexml/tests/035.phpt (revision 7f2f0c00)
1--TEST--
2SimpleXML: __toString
3--EXTENSIONS--
4simplexml
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--EXPECT--
22Blah 1
23Blah 1
24Blah 1
25