I have learned that static variables are shared through the inheritance tree. I got the following code from a tutorial I have been watching, and was wondering why when $foo is set to 3 it echos out "3" for class One, Two, and Three?
class One {
static $foo;
}
class Two extends One {};
class Three extends One {}
One::$foo=1;
Two::$foo=2;
Three::$foo=3;
echo One::$foo;
echo Two::$foo;
echo Three::$foo;