File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / xml / tests / bug62328.phpt
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Mon Jul 22 01:32:10 2013 UTC (11 years, 1 month ago) by misho
Branches: php, MAIN
CVS tags: v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17, HEAD
5.4.17

--TEST--
Bug #62328 (implementing __toString and a cast to string fails)
--SKIPIF--
<?php
require_once("skipif.inc");
?>
--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"

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>