Static Properties & Methods In Object Oriented PHP - Full PHP 8 Tutorial

Описание к видео Static Properties & Methods In Object Oriented PHP - Full PHP 8 Tutorial

In the first section of the course, you learned about variable scopes & static variables. In this lesson, you will learn about static properties & methods of the class with some use cases including singleton & factory design patterns. There are few differences between static properties & non-static properties, one is that static properties are associated & belong to the class itself & not to any particular object, while non-static properties are associated & belong to the object. So when you create an object, that object gets fresh values for the non-static properties. Another difference is that you need to use the dollar sign when accessing static properties, unlike regular properties where you don't use the dollar sign to access non-static properties.

SOME OF THE WAYS YOU CAN SUPPORT THE CHANNEL
👍 Smash the like button
🤝 Subscribe to the channel & turn the notifications on
💬 Post comments, any feedback is greatly appreciated
⭐ Become a Patreon:   / programwithgio  
THANK YOU!

LESSON 2.7
Course Outline - https://github.com/ggelashvili/learnp...
Course Playlist -    • Learn PHP The Right Way - Full PHP Tu...  

RESOURCES
Video About Static Variables & Scopes -    • PHP Variable Scopes - Static Variable...  &t=193

Комментарии

Информация по комментариям в разработке