class A {
public static function who() {
echo __CLASS__.PHP_EOL;
}
public static function test() {
self::who();
}
public static function test2() {
static::who();
}
}
class B extends A {
public static function who() {
echo __CLASS__;
}
}
B::test();//A
B::test2();//B
原文地址:http://blog.51cto.com/phpme/2128213