Static Properties
Static Properties
Static properties can be accessed directly without creating an instance of a class. Static properties can be declared by using the static keyword.
To access a static property we need to write the class name followed by a double colon (::), and the property name.\
Example:
A static method can be accessed from a method in the same class using the self keyword followed by a double colon (::), and the method name.
Example
If we need to call a static property from a child class, we can use the parent keyword inside the child class.
Example: