The static modifier that precedes $onlyOne ties the variable to the class itself.
$onlyOne 之前的静态修饰符将此变量关系到类本身。
When an attribute does not have the static modifier, it is said to be an object attribute, as that property is unique for each instance of the class.
当一个属性不具有静态修饰符时,就称其是一个对象属性,因为该属性对类的每个实例都是惟一的。
The problem is that programmers could accidentally write such code (say by mistakenly including a static modifier in a field declaration, due to copy-and-pasting).
问题是程序员可能会无意中编写这样的代码(比如,由于“复制和粘贴”操作,错误地在字段声明中包括静态修饰符)。
应用推荐