diff options
| author | Thijs Kinkhorst <thijs@debian.org> | 2014-10-15 13:17:14 +0000 |
|---|---|---|
| committer | Thijs Kinkhorst <thijs@debian.org> | 2014-10-15 13:17:14 +0000 |
| commit | 04b664c46aafc46bb3030d3bf06eb5f0b38c2b49 (patch) | |
| tree | 07e2dbf984b126837bfc6c20e0a025c754ade299 /ext/simplexml/tests | |
| parent | d73ee84cfbc86e793602b826adb0dd6bce042838 (diff) | |
| download | php-04b664c46aafc46bb3030d3bf06eb5f0b38c2b49.tar.gz | |
Imported Upstream version 5.6.1+dfsgupstream/5.6.1+dfsg
Diffstat (limited to 'ext/simplexml/tests')
| -rw-r--r-- | ext/simplexml/tests/bug62328.phpt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/simplexml/tests/bug62328.phpt b/ext/simplexml/tests/bug62328.phpt new file mode 100644 index 000000000..a6e60e488 --- /dev/null +++ b/ext/simplexml/tests/bug62328.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #62328 (implementing __toString and a cast to string fails) +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php +class UberSimpleXML extends SimpleXMLElement { + public function __toString() { + return 'stringification'; + } +} + +$xml = new UberSimpleXML('<xml/>'); + +var_dump((string) $xml); +var_dump($xml->__toString()); +--EXPECT-- +string(15) "stringification" +string(15) "stringification" |
