Code examples demonstrating the S.O.L.I.D. principles of object-oriented design.
- Single Responsibility Principle (SRP)
- Open/Closed Principle (OCP)
- Liskov Substitution Principle (LSP)
- Interface Segregation Principle (ISP)
- Dependency Inversion Principle (DIP)
Each principle has its own directory with annotated PHP examples.
git clone https://github.com/albertguedes/solid-principles-with-php.git
cd solid-principles-with-php
php <principle-folder>/example.php- PHP (pure OOP)
MIT License - see LICENSE