PHP: Static and non Static functions and Objects

Static functions, by definition, cannot and do not depend on any instance properties of the class. That is, they do not require an instance of the class to execute (and so can be executed as you’ve shown without first creating an instance). In some sense, this means that the function doesn’t (and will never need to) depend on members or methods (public or private) of the class.

Leave a Comment