Understanding Static Methods | Object-Oriented PHP | Section-1 | Part-5

Опубликовано: 06 Июнь 2026
на канале: Nafis's Classroom
660
0

We previously saw how to use the object operator and how constructor methods are implemented inside a PHP class. Using the object operator, we saw how to acess the public property of our class. In this lesson, we shall move towards a more direct approach in method accessibilty. Besides, this video will show you a primary difference between magic methods and methods defined by the programmer. In a magic method, the static keyword cannot be applied as a constructor method is a already representative function, we will not be able to refer to it using it's name but rather methods that are custom-defined will be able to accept the static keyword. Hence, methods that are statically declared can be addressed using the scope resolution operator, through the utilization of the class name.