类中 静态方法和静态属性的引用方法
例如
class Test{
public static $test = 1;
public static function test(){
}
}
可以不用实例化对象直接使用 Test::$test 来取得$test属性的值
静态方法调用也同理Test::test(); 直接调用静态方法test
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号