author:咔咔
wechat:fangkangfk
Static 关键字
因为静态方法不须要经过对象便可调用,因此伪变量 $this 在静态方法中不可用。this
静态属性不能够由对象经过 -> 操做符来访问。spa
1.普通方法调用静态方法对象
$thisclass
self变量
parentobject
Index(本类)方法
2.静态方法调动普通方法im
Using $this when not in object context