Annotation of embedaddon/php/ext/spl/tests/bug64023.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #64023: Overloading __toString() in SplFileInfo has no effect
! 3: --FILE--
! 4: <?php
! 5: class A extends \SplFileInfo
! 6: {
! 7: public function __toString() {return ' -expected- ';}
! 8: }
! 9:
! 10: $a = new A('/');
! 11:
! 12: // Works
! 13: echo $a, $a->__toString(), $a->__toString() . '', "\n";
! 14:
! 15: // Does not work - outputs parent::__toString()
! 16: echo $a . '', "\n";
! 17:
! 18: --EXPECT--
! 19: -expected- -expected- -expected-
! 20: -expected-
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>