Questions for class member modifiers
Class a{
private static $p 1;
public static $p 2;
}
As in the code above, the member variable is preceded by the private static modifier and only with the private difference where? Similarly, where is the difference between public static and public?
------Solution--------------------
Static keyword: Declaring a class member or method as static can be accessed directly without instantiating the class. Static members cannot be accessed through an object (except static methods)
------Solution--------------------
Private, accessible only in declared classes
Public in common, can be accessed by anyone (default)
Static, only static access to the Classname::identifiers
------Solution--------------------
A static method or property that can be called externally,
Private definition, which can only be called inside a class