php中::是什么意思?
1 回答

一只斗牛犬
TA贡献1784条经验 获得超2个赞
类中 静态方法和静态属性的引用方法
例如
class Test{
public static $test = 1;
public static function test(){
}
}
可以不用实例化对象直接使用 Test::$test 来取得$test属性的值
静态方法调用也同理Test::test(); 直接调用静态方法test
- 1 回答
- 0 关注
- 454 浏览
添加回答
举报
0/150
提交
取消