diff options
author | Ferenc Kovacs <tyrael@php.net> | 2014-08-24 00:09:00 +0200 |
---|---|---|
committer | Ferenc Kovacs <tyrael@php.net> | 2014-08-24 00:09:00 +0200 |
commit | a90d05a4304a2ef832afe059dc19c7f14ca86f58 (patch) | |
tree | c51c8488d1f5d763c9aa51aa85132ab7f31c2109 /ext/simplexml | |
parent | c4fb183b9fd6fecf7dfb8df309bfa34ff1ec2e53 (diff) | |
parent | cb41a7bad1350f1c9bd162abf52eea128a395e0a (diff) | |
download | php-git-a90d05a4304a2ef832afe059dc19c7f14ca86f58.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
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" |