class Foo {
public static function foobar() {
self::whereami();
}
protected static function whereami() {
echo 'foo';
}
}
class Bar extends Foo {
protected static function whereami() {
echo 'bar';
}
}
Foo::foobar();
Bar::foobar();
expected foobar
actual result foofoo
更糟糕的是,服务器被限制为php 5.2
https://stackoverflow.com/questions/5853310
复制相似问题