static inheritance in a class object

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

 



Anyone know why class static vars are inherited?  (See code below)

class A
{
   public static $CONFIG = null;
}

A::$CONFIG = "A";

class B extends A
{
   public static $CONFIG = null;
}

B::$CONFIG = "B";

print ("A: " . A::$CONFIG . "<br>");
print ("B: " . B::$CONFIG . "<br>");

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