Tag: oop
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.
2mo ago
security intermediate
Object Calisthenics
Nine strict OO coding rules by Jeff Bay that, if followed, force good object-oriented design habits.
3mo ago
quality advanced
Observer Pattern
PHP 5.0+
Defines a one-to-many dependency so that when one object changes state, all its registered observers are notified automatically.
3mo ago
general intermediate
Open/Closed Principle
PHP 5.0+
Classes should be open for extension but closed for modification — add behaviour without changing existing code.
3mo ago
quality intermediate