php访问静态方法的方式:1、使用self,代码为【self::test();】;2、使用类名,代码为【a::test()】;3、使用static,代码为【public function test1(){static::test()}】。
php访问静态方法的方式:
1:使用self,代码如下
test1();//结果 test
2:使用类名,代码如下
test1();//结果 test
3:使用static,代码如下
test1();//结果 test
上一篇:PHP实例方法有什么
下一篇:php实现排序算法的方法