Annotation of embedaddon/php/Zend/tests/bug48215.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #48215 - parent::method() calls __construct
! 3: --FILE--
! 4: <?php
! 5: class A
! 6: {
! 7: public function __construct() {
! 8: echo __METHOD__ . "\n";
! 9: }
! 10: protected function A()
! 11: {
! 12: echo __METHOD__ . "\n";
! 13: }
! 14: }
! 15: class B extends A
! 16: {
! 17: public function __construct() {
! 18: echo __METHOD__ . "\n";
! 19: parent::__construct();
! 20: }
! 21: public function A()
! 22: {
! 23: echo __METHOD__ . "\n";
! 24: parent::A();
! 25: }
! 26: }
! 27: $b = new B();
! 28: $b->A();
! 29: ?>
! 30: ===DONE===
! 31: --EXPECTF--
! 32: B::__construct
! 33: A::__construct
! 34: B::A
! 35: A::A
! 36: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>