calling a derived static method from a base class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



<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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux