开发者

Access static variables in an abstract class in PHP

开发者 https://www.devze.com 2022-12-29 20:32 出处:网络
Is there any other way to access a static variable from a static method, other开发者_运维技巧 than using classname::$variable?self::$variable, if it\'s in the same class.If it is different class:

Is there any other way to access a static variable from a static method, other开发者_运维技巧 than using classname::$variable?


self::$variable, if it's in the same class.


If it is different class:

classname::$variable

If it is same class:

self::$variable
0

精彩评论

暂无评论...
验证码 换一张
取 消