A structured collection of lessons covering Object-Oriented Programming in PHP, organized as a step-by-step premium course with 17 practical modules.
| Lesson | Topic |
|---|---|
| 01 | Class and Object |
| 02 | Object Properties |
| 03 | Object Methods |
| 04 | __construct and __destruct Methods |
| 05 | Homework. Class for Working with a File |
| 06 | Class Constants. Static Properties and Methods |
| 07 | Inheritance. Part 1 |
| 08 | Inheritance. Part 2 |
| 09 | Access Modifiers |
| 10 | Abstract Classes and Interfaces |
| 11 | Interfaces and Type Control |
| 12 | Autoloading and Namespaces |
| 13 | Composer and Autoloading |
| 14 | Traits |
| 15 | Late Static Binding |
| 16 | Magic Methods |
| 17 | Design Patterns |
- PHP 7.4 or higher
- A web server (Apache / Nginx) or PHP built-in server
# Clone the repository
git clone https://github.com/AOgit/php_oop.git
cd php_oop
# Run a specific lesson using the PHP built-in server
php -S localhost:8000 -t 01/Then open http://localhost:8000 in your browser, or run files directly from the command line:
php 01/index.php- Core OOP concepts: classes, objects, properties, and methods
- Encapsulation, inheritance, polymorphism, and abstraction
- Abstract classes and interfaces, including type control
- PHP magic methods (
__construct,__destruct,__get,__set,__toString, etc.) - Namespaces, PSR-4 autoloading, and Composer
- Traits and late static binding
- Common design patterns in PHP
php_oop/
├── 01/ # Lesson 01
├── 02/ # Lesson 02
├── ...
├── 17/ # Lesson 17
└── README.md
- Language: PHP (100%)
This project is intended for educational purposes.