Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jawaid's avatar

jawaid wrote a comment+100 XP

5mos ago

Object-Oriented Principles in PHP: Ep 9, Understanding Object Composition and Abstractions

When to use abstract classes and when to use Interfaces? How do you decide which one to use?

jawaid's avatar

jawaid wrote a comment+100 XP

5mos ago

Object-Oriented Principles in PHP: Ep 8, From Getters and Setters to Property Hooks

So, property hooks are a great addition, I like it. Though, we could achieve similar behavior with magic methods __get() and __set() which of course would not be as clean as property hooks but very close except that those two functions are not for public properties. What's your take on this Jeffrey?