php 静态方法

The only rule is that static methods or properties are out of object context. For example, you cannot use $this inside of a static method.

$MyClass = new MyClass();

$MyClass->Foo();
MyClass::Foo()

-------------------------------------------

static: 谁调用算谁的,
self: 当前类, 所在的当前的类。。。

 

posted @ 2020-05-12 14:38  qqisnow2021  阅读(121)  评论(0编辑  收藏  举报