Tag: oop
Late Static Binding — PHP 5.3 Feature
PHP 5.3+
static:: (Late Static Binding, PHP 5.3) refers to the called class at runtime — unlike self:: which always refers to the class where the method is defined.
2mo ago
php intermediate
Lazy Objects (PHP 8.4)
PHP 8.4+
PHP 8.4 native lazy object proxies defer initialisation until first access — enabling zero-cost dependency injection of services that may never be used in a request.
3mo ago
php advanced
Low Cohesion
A class or module that does many unrelated things — high coupling's counterpart, making code hard to understand, test, and reuse.
3mo ago
quality intermediate
Late Static Binding (static::)
PHP 5.3+
static:: refers to the class actually called at runtime rather than the class where the method is defined, enabling polymorphic static methods.
3mo ago
php advanced
Law of Demeter
A design guideline: a method should only call methods on itself, its parameters, objects it creates, and its direct fields.
3mo ago
quality intermediate
Law of Demeter — PHP Examples
The Law of Demeter (don't talk to strangers) limits method chains — each unit should call only its direct collaborators, not traverse object graphs.
3mo ago
quality intermediate
Liskov Substitution Principle
Subtypes must be substitutable for their base types without altering the correctness of the program.
3mo ago
quality intermediate
Long Parameter List
A function or method with too many parameters — typically 4+ — making calls hard to read and easy to get wrong.
3mo ago
quality beginner
Lazy Loading
HTML5
Defer loading or initialising a resource until it is actually needed, reducing startup cost and memory usage.
3mo ago
performance beginner