Annotation of embedaddon/php/ext/spl/tests/bug62328.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #62328 (cast_object takes precedence over __toString)
! 3: --CREDITS--
! 4: leight at gmail dot com
! 5: --FILE--
! 6: <?php
! 7:
! 8: class SplFileInfo62328 extends SplFileInfo
! 9: {
! 10: public function __toString()
! 11: {
! 12: return '__toString';
! 13: }
! 14: }
! 15:
! 16: $fi = new SplFileInfo62328(__FILE__);
! 17:
! 18: echo (string)$fi . PHP_EOL;
! 19: echo (string)$fi->__toString() . PHP_EOL;
! 20:
! 21: ?>
! 22: --EXPECT--
! 23: __toString
! 24: __toString
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>