Tag: oop
🤖 AI Guestbook — #oop educational data only
|
|
Last 30 days
Agents 40
Amazonbot 13PetalBot 8Google 5SEMrush 4ChatGPT 4Bing 3Baidu 2Ahrefs 1
Amazonbot 12PetalBot 11Bing 4ChatGPT 3Ahrefs 3SEMrush 1
Amazonbot 1.7kPetalBot 1.3kAhrefs 1.1kSEMrush 995Scrapy 966Google 793Perplexity 786Bing 619ChatGPT 614Unknown AI 404Claude 258Twitter/X 254Applebot 242Brave Search 172Majestic 129Meta AI 112Sogou 67Common Crawl 60Baidu 52Qwen 15DuckDuckGo 7You.com 2
Most referenced — #oop
#[Override] Attribute (PHP 8.3) 3Interpreter Pattern 3Global Function Style vs OOP Evolution 2Command Query Separation (CQS) 2Active Record Pattern 2Command Pattern 2Data Clump 2TypeScript Decorators 2
How they use it
crawler 10.1k
crawler_json 465
your_contextpost 56
your_context 2
rag 1
pre-tracking 50
Tag total10.7k pings
Terms pinged114 / 114
Distinct agents21
Iterating Objects with foreach (Iterator & IteratorAggregate)
PHP 5.5+
3
foreach can traverse any object implementing Iterator or IteratorAggregate, not just arrays — control iteration without exposing internal state.
4mo ago
PHP intermediate
#[Override] Attribute (PHP 8.3)
PHP 8.3+
The #[Override] attribute tells PHP (and static analysers) that a method is intentionally overriding a parent class or interface method — if no such method exists in a parent, PHP throws an error at class load time.
7mo ago
PHP intermediate
Abstract readonly Properties
PHP 8.4+
PHP 8.4 allows abstract readonly properties in abstract classes and interfaces — defining that implementations must provide a readonly property of a specific type.
7mo ago
PHP advanced
Extract Class Refactoring
Extract Class splits a large class into two — moving a cohesive subset of fields and methods into a new class that the original delegates to.
7mo ago
Code Quality intermediate
Global Function Style vs OOP Evolution
PHP 4.0+
PHP 4's procedural global-function style evolved into PHP 5 OOP — understanding the transition explains why modern PHP has both paradigms and how to migrate legacy procedural code.
7mo ago
PHP beginner
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.
7mo ago
PHP intermediate
Method Chaining Pitfalls & Alternatives
Method chaining (fluent interfaces) improves readability for builders but creates debugging difficulties, encourages temporal coupling, and can hide null returns.
7mo ago
Code Quality intermediate
new in Initializers (PHP 8.4)
PHP 8.4+
PHP 8.4 allows 'new ClassName()' expressions in default parameter values, attribute arguments, and static property initialisers — removing the need for null defaults combined with late assignment in constructors.
7mo ago
PHP intermediate
Property Hooks (PHP 8.4)
PHP 8.4+
PHP 8.4 property hooks add get and set accessors directly to property declarations — eliminating the need for explicit getter/setter methods on simple value objects.
7mo ago
PHP advanced
Traits — Horizontal Reuse (PHP 5.4)
PHP 5.4+
PHP 5.4 traits enable horizontal code reuse — mixins for PHP classes that can't use multiple inheritance. Use sparingly; prefer composition over trait overuse.
7mo ago
PHP intermediate
Object Cloning & Security Implications
PHP 5.0+
clone creates a shallow copy — nested objects are still shared references. Implement __clone() for deep copy and audit what sensitive state gets duplicated.
7mo ago
Security intermediate
PHP 5 OOP Revolution — Objects by Reference
PHP 5.0+
1
PHP 5 completely replaced PHP 4's object model — objects became reference-counted handles rather than copies, enabling true OOP with interfaces, abstract classes, visibility, and exceptions.
7mo ago
PHP intermediate
ES6 Class Syntax
ES2015
ES6 classes are syntactic sugar over prototypal inheritance — the keywords mirror PHP but the underlying mechanism is different.
7mo ago
JavaScript intermediate
__slots__ & Memory Optimisation
Python 3.0+
1
Declaring __slots__ on a class prevents the dynamic __dict__ per instance — reducing memory usage by 40-60% for classes with many instances.
7mo ago
Python intermediate
Abstract Factory Pattern
PHP 5.0+
Creates families of related objects ensuring they are used together consistently without mixing implementations.
7mo ago
Code Quality intermediate
Active Record Pattern
PHP 5.0+
6
A design pattern where a database row is wrapped in an object that includes both the data and the persistence logic — the object knows how to save, update, and delete itself.
7mo ago
Code Quality intermediate
Asymmetric Visibility (PHP 8.4)
PHP 8.4+
PHP 8.4 allows separate read and write visibility on properties — public(get) private(set) means anyone can read but only the class can write.
7mo ago
PHP intermediate
Domain Model Pattern
2
An object model of the domain that incorporates both behaviour and data — entities with methods expressing domain operations rather than just data containers.
7mo ago
Code Quality advanced
Fluent Builder Pattern
Returns $this from each setter enabling method chaining — used in query builders, test factories, and configuration objects.
7mo ago
Code Quality intermediate
Gateway Pattern
1
A class that encapsulates access to an external system or resource — wrapping HTTP APIs, queues, or legacy systems behind a clean interface that the rest of the application uses.
7mo ago
Code Quality intermediate