Annotation of embedaddon/php/Zend/tests/bug61782.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #61782 (__clone/__destruct do not match other methods when checking access controls)
! 3: --FILE--
! 4: <?php
! 5: abstract class BaseClass {
! 6: abstract protected function __clone();
! 7: }
! 8:
! 9: class MommasBoy extends BaseClass {
! 10: protected function __clone() {
! 11: echo __METHOD__, "\n";
! 12: }
! 13: }
! 14:
! 15: class LatchkeyKid extends BaseClass {
! 16: public function __construct() {
! 17: echo 'In ', __CLASS__, ":\n";
! 18: $kid = new MommasBoy();
! 19: $kid = clone $kid;
! 20: }
! 21: public function __clone() {}
! 22: }
! 23:
! 24: $obj = new LatchkeyKid();
! 25: echo "DONE\n";
! 26: --EXPECT--
! 27: In LatchkeyKid:
! 28: MommasBoy::__clone
! 29: DONE
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>