非静态地调用静态方法

I came across something like this, and am not sure what to make off it. Is there any good reason to do this, or to avoid it?

class Foo {

  static public function bar() {}

}

someMethod() {

  $instanceOfFoo->bar();

}
查看全部
dtuzjzs3853
dtuzjzs3853
2013/04/02 02:24
  • static
  • php
  • 点赞
  • 收藏
  • 回答
    私信
满意答案
查看全部

2个回复