Annotation of embedaddon/php/ext/xml/tests/bug62328.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #62328 (implementing __toString and a cast to string fails)
! 3: --SKIPIF--
! 4: <?php
! 5: require_once("skipif.inc");
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9: class UberSimpleXML extends SimpleXMLElement {
! 10: public function __toString() {
! 11: return 'stringification';
! 12: }
! 13: }
! 14:
! 15: $xml = new UberSimpleXML('<xml/>');
! 16:
! 17: var_dump((string) $xml);
! 18: var_dump($xml->__toString());
! 19: --EXPECT--
! 20: string(15) "stringification"
! 21: string(15) "stringification"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>