calling a derived static method from a base class

From: Date: Thu, 05 May 2005 14:56:56 +0000
Subject: calling a derived static method from a base class
Groups: php.general 
Request: Send a blank email to php-general+get-214543@lists.php.net to get a copy of this message
<code> class Base { static function f() { self::g(); } static function g() { print("Base\n"); } } class Derived extends Base { static function g() { print("Derived\n"); } } Derived::f(); </code> I want that to print "Derived", but it prints "Base" instead. How can I get it to do what I want? Thank for the help.

« previous php.general (#214543) next »