# PHP OOP Learning Repository
## 📘 Overview
This repository is a structured, web‑runnable collection of examples demonstrating modern PHP Object‑Oriented Programming concepts.
It is designed for clarity, modularity, and real‑world learning — and doubles as a portfolio piece showing clean architecture and progressive mastery.
Each topic is isolated in its own folder with:
- One or more PHP classes
- A runnable `example.php`
- A focused `README.md` explaining the concept
Every file includes a header with file name, description, date created, and author.
---
## 🚀 How to Run
1. Clone the repository:
```bash
git clone https://github.com/yourusername/php-oop-learning.git- Start a local PHP server:
php -S localhost:8000 -t public
- Open in your browser:
http://localhost:8000
Most standalone examples can also be run directly:
php example.php- 01‑classes-and-objects/
- 02‑properties-and-methods/
- 03‑constructors/
- 04‑inheritance/
- 05‑interfaces/
- 06‑abstract-classes/
- 07‑traits/
- 08‑namespaces-and-autoloading/
- 09‑exceptions/
Classic OOP design patterns (Singleton, Factory, Strategy, Observer, etc.).
- 20‑mvc-mini-framework/ — original, simplest MVC
- 21‑mvc-mini-framework-lite/ — adds BaseController, layout, simple router
- 22‑mvc-mini-framework-advanced/ — namespaces, PSR‑4 autoloader, Request/Response, BaseModel
- 23‑mvc-mini-framework-pro/ — middleware, service container, config, ORM simulation
Traits, generators, iterators, magic methods, exceptions.
Unit testing with PHPUnit, mocking dependencies, controller tests.
PDO basics, prepared statements, transactions, ORM simulation.
Input validation, escaping, CSRF tokens, password hashing.
Caching, profiling, optimization techniques.
Environment configs (.env), Docker basics, deployment scripts.
JSON handling, cURL API calls, external service wrappers.
Advanced autoloader experiments (extras section).
Bonus topics: CLI tools, reflection, attributes, async programming (Fibers).
- Learning progression — each folder builds on the last, showing growth in skill and architecture.
- Recruiter‑friendly — clean structure, modular examples, clear documentation.
- Practical showcase — demonstrates not just coding, but testing, security, performance, deployment, and integrations.
Created by Michael Monteith
Date scaffolded: December 2025
MIT License — free to use, modify, and learn from.
---