diff options
author | Etienne Kneuss <colder@php.net> | 2008-05-03 15:09:37 +0000 |
---|---|---|
committer | Etienne Kneuss <colder@php.net> | 2008-05-03 15:09:37 +0000 |
commit | 57b8e8394512e2b7c862011ff51d8063f8e96551 (patch) | |
tree | 4cfed5dbb176f10cc4cd7317d561e1c2b3e3c89a /ext/simplexml/tests/035.phpt | |
parent | 04929019d2797424081a85d48efb49be66a64334 (diff) | |
download | php-git-57b8e8394512e2b7c862011ff51d8063f8e96551.tar.gz |
MFH: Fix #44484 (define SimpleXMLElement::__toString())
Diffstat (limited to 'ext/simplexml/tests/035.phpt')
-rw-r--r-- | ext/simplexml/tests/035.phpt | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/ext/simplexml/tests/035.phpt b/ext/simplexml/tests/035.phpt new file mode 100644 index 0000000000..2162c865f3 --- /dev/null +++ b/ext/simplexml/tests/035.phpt @@ -0,0 +1,26 @@ +--TEST-- +SimpleXML: __toString +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php +$string = '<?xml version="1.0"?> +<foo><bar> + <p>Blah 1</p> + <p>Blah 2</p> + <p>Blah 3</p> + <tt>Blah 4</tt> +</bar></foo> +'; +$foo = simplexml_load_string($string); +$p = $foo->bar->p; +echo $p."\n"; +echo $p->__toString()."\n"; +echo $p."\n"; +?> +==Done== +--EXPECT-- +Blah 1 +Blah 1 +Blah 1 +==Done== |