Bug #12703 Updated: Refering to BUG# 12560

From: Date: Mon, 22 Oct 2001 00:16:46 +0000
Subject: Bug #12703 Updated: Refering to BUG# 12560
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-68665@lists.php.net to get a copy of this message
ID: 12703 Updated by: sniper Reported By: stephan.skusa@lippe-net.de Old Status: Open Status: Closed Bug Type: Class/Object related Operating System: Linux PHP Version: 4.0.6 New Comment: Works for me fine with PHP 4.1.0RC1: <?php class X { function X() { } } class A extends X { function A() { X::X(); } function crash_me() { echo "CRASHME A<br>\n"; } } class B extends A { function B() { A::A(); } function crash_me() { echo "CRASHME B<br>\n"; parent::crash_me(); } } class C extends B { function C() { B::B(); } } $r = new C(); $r->crash_me(); ?> Previous Comments: ------------------------------------------------------------------------ [2001-08-11 19:24:00] stephan.skusa@lippe-net.de On Linux this has the same behaviour even if you replace $this-> reference by parent:: or A::, B:: references: class A extends X { function A() { X::X(); } function crash_me() { echo "CRASHME A<br>\n"; } } class B extends A { function B() { A::A(); } function crash_me() { echo "CRASHME B<br>\n"; parent::crash_me(); } } class C extends B { function C() { B::B(); } } $r = new C(); $r->crash_me(); echoes lots of CRASHME B ... but not any CRASHME A ... ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12703&edit=1

« previous php.dev (#68665) next »