开发者

How to declare public static class fields in PHP4

开发者 https://www.devze.com 2023-02-03 23:58 出处:网络
Do you have the solutions that public static class fields in PHP4 var static $field = nul开发者_JAVA技巧l;

Do you have the solutions that public static class fields in PHP4

var static $field = nul开发者_JAVA技巧l;
Parse error: syntax error, unexpected T_STATIC, expecting T_VARIABLE 


PHP 4 didn't support static properties natively. The best you could do was implement static variables inside of your methods. Maybe the following link is useful for you:

http://adam.bregenzer.net/php/static_class_properties

0

精彩评论

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