diff options
author | Ferenc Kovacs <tyrael@php.net> | 2014-08-24 00:09:31 +0200 |
---|---|---|
committer | Ferenc Kovacs <tyrael@php.net> | 2014-08-24 00:09:31 +0200 |
commit | 86966a092b6e8dd27d3851ba0c19d52523d09b58 (patch) | |
tree | 7ee82c4411faed3813d14422ad72c5d9fa5b82db /ext/simplexml | |
parent | ce9bdae33f101ff85c08d32ce5c2c6502a451d62 (diff) | |
parent | a90d05a4304a2ef832afe059dc19c7f14ca86f58 (diff) | |
download | php-git-86966a092b6e8dd27d3851ba0c19d52523d09b58.tar.gz |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
this test depends on the simplexml ext, not just on xml
Diffstat (limited to 'ext/simplexml')
-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 0000000000..a6e60e488c --- /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" |