note 8332 deleted from language.oop by victor

From: Date: Sat, 07 Dec 2002 15:41:39 +0000
Subject: note 8332 deleted from language.oop by victor
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40473@lists.php.net to get a copy of this message
[Editor's note: This comment is notcorrect for PHP4, there is a way of calling the parent method, by using the "parent::method()" syntaxis, e.g: class a { function init() { echo "FOO"; } } class b extends a { function init() { a::init(); echo " and BAR"; } } $o = new b; $o->init(); Which will print: "FOO and BAR"] Actually the comment left by darkarena@idcomm.com is correct. cleong@organic.com is mistaken. You CANNOT call an overloaded parent function without trickery. For example: class a { function init(){} } class b extends a { function init(){} } How would you call a->init() from b ?

« previous php.notes (#40473) next »