Static Properties & Methods In OOP PHP | Introduction To Object-Oriented PHP | PHP Tutorials
HTML-код
- Опубликовано: 3 окт 2024
- This video will introduce you to Static Properties & Methods in Object Oriented PHP - Learn how to reduce development time based in PHP
📚 New Udemy Course
If you're looking to level up your Laravel skills, my new course "Udemy Migirations, Seeders, Factories, Query Builder, Eloquent & Relationships" is the perfect opportunity. Learn the essential tools and techniques for building robust and scalable web applications with Laravel: www.udemy.com/...
📲 Let’s plan a meeting
Plan a (paid) 1-hour meeting on Calendly to do portfolio reviews, code reviews resume reviews or a coaching session for Laravel. Please read the description before booking: calendly.com/c...
💌 Newsletter
Sign up for my free weekly email newsletter: www.newsletter...
🔥 Resources
PHP Hosting (10% DISCOUNT): www.hostinger....
TikTok: / codewithdary
Instagram: / codewithdary
Twitter: / codewithdary
Blog: blog.codewithd...
Newsletter: newsletter.cod...
Patreon: www.patreon.co...
GitHub: github.com/cod...
Want to learn more?
Courses: / @codewithdary
#oop #php #objectorientedprogramming
So in general we can access properties in various methods and which method it will be it depends on how I will name my properties - if it will be public, private, protected or static. But what I thinking - why i need to call my parameters and methods static and mix my properties with different types? In one class I will have two types of parameters which I can access in 2 different ways. If I want to have separate parameters I would create separate class for that and use basic instant. I cant see in what scenarios static naming would be useful. In the end you mentioned when, but it still feels like static is no need. :)
Thanks for tutorial!
Your right. I really don't use it a lot. It's a bigger thing when you work in C#.
Awosem please make some php oops projects
Ah now I see. Static properties are read only outside the class?
Bedankt Dary
Depends on the access control (public/protected/private)
Me queda claro... thank you
You are welcome! :)