Skip to content

Galhoom22/php-oop-documentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

📘 PHP OOP Documentation

Your Complete Guide to Object-Oriented Programming in PHP


PHP OOP Source Tracks Progress Current


╔══════════════════════════════════════════════════════════════════════╗
║                                                                      ║
║     🐘  P H P   O O P   D O C U M E N T A T I O N   B O O K  📖      ║
║                                                                      ║
║          Lectures  ──▶  Interview Prep  ──▶  Final Project          ║
║                                                                      ║
╚══════════════════════════════════════════════════════════════════════╝

🎯 This repo is for those who want to study everything related to OOP in PHP
with modern PHP 8.5+ syntax. All lectures follow the
official PHP documentation,
with interview questions and a final project to master it all.


📊 My Progress · 🚀 Get Started · 📚 Lectures · 💼 Interviews · 🏗️ Project




📑 Table of Contents

Section What’s inside
📊 My Progress Status, lecture list, milestones
🎯 Purpose Why this book exists
👤 Who This Is For Is this for you?
🗺️ Learning Path Lectures → Interviews → Project
📚 Track 1 — Lectures 31 sessions in 3 parts
💼 Track 2 — Interviews 42 questions
🏗️ Track 3 — Final Project SupportDesk Lite
🚀 How to Start Your first step
📁 Repository Structure Folder map
⚙️ Requirements What you need
🔗 Official Sources Trusted references



📊 My Progress


╔══════════════════════════════════════════════════════════════╗
║              📈  L E A R N I N G   J O U R N E Y              ║
╚══════════════════════════════════════════════════════════════╝

🗓️ Overall Status


Track Progress Status
📚 Lectures 8 / 31 🟡 In Progress — Lecture 9 next
💼 Interview Questions 0 / 42 🔒 Locked — starts after Lecture 31
🏗️ Final Project 0 / 14 milestones 🔒 Locked — starts after interviews

Lecture Progress

12345678910111213141516171819202122232425262728293031

[████████░░░░░░░░░░░░░░░░░░░░░░░░░] 26%


🎯 Current focus: Lecture 9 — Asymmetric Visibility
🏁 Last completed: Lecture 8 — Property Hooks (PHP 8.4)
🏅 Milestone 1 (after Lecture 5) — ✅ Passed


📚 Lecture Progress


📗 Part 1 — Foundations  ·  Lectures 1–10  ·  Part-1-Foundations/
# Folder Topic Status
01 why-not-only-functions Why Functions Alone Are Not Enough
02 class-and-object Class and Object
03 properties Properties
04 methods Methods
05 Milestone-constructor Constructor (Milestone)
06 visibility Visibility
07 encapsulation Encapsulation
08 property-hooks Property Hooks (PHP 8.4)
09 asymmetric-visibility Asymmetric Visibility (PHP 8.4) 🟡 Next
10 inheritance Inheritance

📘 Part 2 — Core OOP  ·  Lectures 11–20  ·  Part-2-Core-OOP/
# Folder Topic Status
11 method-overriding Method Overriding & parent
12 static-and-constants Static & Class Constants
13 abstract-classes Abstract Classes
14 interfaces Interfaces
15 Milestone-polymorphism Polymorphism (Milestone)
16 type-declarations Type Declarations
17 covariance-contravariance Covariance & Contravariance
18 traits Traits
19 magic-methods Magic Methods
20 objects-and-references Objects & References

📙 Part 3 — Modern PHP  ·  Lectures 21–31  ·  Part-3-Modern-PHP/
# Folder Topic Status
21 final-and-cloning Final & Cloning
22 readonly-classes Readonly Classes (PHP 8.2 & 8.5)
23 namespaces-autoloading Namespaces & Autoloading (PSR-4)
24 Milestone-enumerations Enumerations (Milestone)
25 exceptions Exceptions & Errors
26 attributes Attributes (PHP 8.0 – 8.5)
27 anonymous-classes Anonymous Classes & Iteration
28 lazy-objects Lazy Objects (PHP 8.4)
29 lsb-comparison-serialization LSB, Comparison & Serialization
30 mini-project-blog Mini-Project: Blog System
31 Milestone-phpunit-testing PHPUnit Testing (Milestone)

🏅 Milestones


Milestone After Lecture Status
🥉 Milestone 1 — First Objects 05 ✅ Passed
🥈 Milestone 2 — Core OOP 15 ⬜ Not yet
🥇 Milestone 3 — Modern PHP 24 ⬜ Not yet
🏆 Milestone 4 — Full Track Complete 31 ⬜ Not yet

📝 Progress is synced from 01-Lectures/README.md. Update both files when a lecture is completed.




🎯 Purpose

┌─────────────────────────────────────────────────────────────┐
│  " From procedural scripts  →  to professional OOP code "  │
└─────────────────────────────────────────────────────────────┘

Object-Oriented Programming is how real PHP applications are built — from Laravel and Symfony to custom APIs and SaaS products. Yet most tutorials either skip modern language features or teach outdated patterns.


📖 This book gives you one complete, structured path:

🧩 Learn every core OOP concept in PHP using modern syntax PHP 8.5+
📜 Study from official sources — grounded in the PHP manual, not random blog posts
💬 Practice interview questions — explain what you know with confidence
🏆 Build a real capstone project — prove mastery from scratch

🚫 No framework.   🚫 No shortcuts.   ✅ Just PHP, objects, and real skill.




👤 Who This Is For


🧑‍💻 You are… 📈 This book helps you…
🌱 A PHP beginner
variables, functions, arrays, loops
Move from procedural PHP to object-oriented thinking
🔍 A self-taught developer Fill gaps with a clear, ordered curriculum
🎤 Preparing for PHP interviews Practice 42 focused OOP questions with code
📜 A learner who wants official sources Follow lectures tied directly to the PHP manual

🎓 No CS degree required ✍️ You write all the code 📅 One session at a time



🗺️ Learning Path


        ╭──────────────────────────────────────────────────────╮
        │                                                      │
        │   📚  TRACK 1          💼  TRACK 2        🏗️  TRACK 3   │
        │   ──────────          ──────────        ──────────   │
        │   31 Lectures    ──▶  42 Questions  ──▶  Final Project │
        │   Official Docs       Interview Ready   SupportDesk    │
        │                                                      │
        ╰──────────────────────────────────────────────────────╯
                              │
                              ▼
                    🏅  OOP Mastery Achieved

⚠️ Complete the tracks in order. Each track builds on the previous one.




📚 Track 1 — Lectures

╔═══════════════════════════════════════╗
║  📖  C H A P T E R  1  ·  L E C T U R E S  ║
╚═══════════════════════════════════════╝

📂 Track folder 01-Lectures/ — guide + workspace
🔢 Sessions 31 lectures — one concept per session
🗂️ Structure 3 parts: Foundations → Core OOP → Modern PHP
📜 Source Official PHP Manual

How lectures are organized:

Part-1-Foundations/   →  Lectures 01–10
Part-2-Core-OOP/      →  Lectures 11–20
Part-3-Modern-PHP/    →  Lectures 21–31

What you will learn:

🧱 Classes & Objects          🔐 Encapsulation & Visibility
🧬 Inheritance & Interfaces   🧩 Traits & Abstract Classes
🏷️ Enums & Attributes         ⚡ Lazy Objects & Property Hooks
📦 Namespaces & Autoloading    🧪 PHPUnit Testing

📊 My current progress: 8 / 31 lectures done — next is Lecture 9 — Asymmetric Visibility.




💼 Track 2 — Interview Questions

╔═══════════════════════════════════════════════╗
║  🎤  C H A P T E R  2  ·  I N T E R V I E W S  ║
╚═══════════════════════════════════════════════╝

📂 Track folder 02-Interview-Questions/ — guide + workspace
🔢 Questions 42 questions — realistic & code-based
🔗 Linked to Every question maps back to a lecture

What interviewers test:

❓ What is OOP?                ❓ Four OOP principles?
❓ Class vs Object?            ❓ Instantiation & constructors?
❓ Encapsulation in practice   ❓ Abstract vs Interface?
❓ Static vs instance methods  ❓ Traits & conflict resolution
❓ Readonly & immutability     ❓ Testing with PHPUnit

💡 Start this track only after completing all 31 lectures.


Progress Status
0 / 42 🔒 Not started yet



🏗️ Track 3 — Final Project

╔═══════════════════════════════════════════════╗
║  🏆  C H A P T E R  3  ·  F I N A L  P R O J E C T  ║
╚═══════════════════════════════════════════════╝

📂 Track folder 03-Final-Project/ — guide + workspace
🎯 Project SupportDesk Lite — customer support ticketing system
🛠️ Stack Pure PHP · No framework · No database required at first

What you will build:

🎫 Create & manage support tickets
👥 Customers and support agents
💬 Public replies & internal notes
🔄 Status & priority workflows
💾 In-memory & file storage
🔔 Notification system
🧪 PHPUnit test coverage

🏅 This is your final proof — not a lecture replacement.


Progress Status
0 / 14 milestones 🔒 Not started yet



🚀 How to Start


  STEP 1          STEP 2          STEP 3          STEP 4
    📖      ──▶     📝      ──▶     💼      ──▶     🏗️
  Lecture 1     Write Code     Interviews      Project

Step Action Where
1️⃣ 📖 Open the lecture guide and start Lecture 1 01-Lectures/Lecture-01-why-not-only-functions/
2️⃣ ✍️ Type each example into that lecture’s code-N.php files — one session at a time e.g. Lecture-09-asymmetric-visibility/
3️⃣ 💼 After all 31 lectures, practice interview answers 02-Interview-Questions/
4️⃣ 🏗️ Build the capstone when interviews are done 03-Final-Project/

✍️ Remember: You write all the code. The guides teach; your practice files live inside each lecture folder.




📁 Repository Structure


📦 php-oop-documentation/
│
├── 📄  README.md                              ← 📘 Start here · repo overview
│
├── 📂  01-Lectures/                           ← 📚 Track 1 · guide + workspace
│   ├── README.md                              ←    Curriculum & progress
│   ├── Part-1-Foundations/                    ←    Lectures 01–10
│   │   ├── Lecture-01-why-not-only-functions/
│   │   ├── Lecture-05-Milestone-constructor/
│   │   ├── Lecture-09-asymmetric-visibility/  ←    🟡 you are here
│   │   └── ...
│   ├── Part-2-Core-OOP/                       ←    Lectures 11–20
│   │   ├── Lecture-11-method-overriding/
│   │   ├── Lecture-15-Milestone-polymorphism/
│   │   └── ...
│   └── Part-3-Modern-PHP/                     ←    Lectures 21–31
│       ├── Lecture-21-final-and-cloning/
│       ├── Lecture-31-Milestone-phpunit-testing/
│       └── ...
│
├── 📂  02-Interview-Questions/                ← 💼 Track 2 · 42 questions
│   ├── README.md
│   ├── Question-01-what-is-oop/
│   └── ...
│
└── 📂  03-Final-Project/                      ← 🏆 Track 3 · SupportDesk Lite
    ├── README.md
    ├── src/                                   ←    (student-created)
    └── tests/                                 ←    (student-created)

💡 Each track folder is self-contained — open it on GitHub and its guide appears automatically.
🏷️ Lecture folders use Lecture-NN-topic so you can find the right session at a glance.




⚙️ Requirements


🐘 PHP 8.5+
📖 Basic PHP — variables, functions, arrays, control structures
💻 A local PHP environment to run .php files
📦 Composer & PHPUnit (introduced later)



🔗 Official Sources


📜 All lecture and interview content is built on trusted, official documentation.


Source Link
🐘 PHP Manual — OOP php.net/manual/en/oop5.intro.php
📖 PHP Language Reference php.net/manual/en/langref.php
🧪 PHPUnit Documentation docs.phpunit.de



╔══════════════════════════════════════════════════════════════╗
║                                                              ║
║   📘  Read.  ✍️  Write.  💬  Explain.  🏗️  Build.  🏅  Master.  ║
║                                                              ║
╚══════════════════════════════════════════════════════════════╝

Documentation provided for learning purposes.
Refer to the official PHP manual for authoritative language behavior.


🐘 Happy Learning!

About

This repo is for those who want to study everything related to OOP in PHP with modern PHP 8.5+ syntax. All lectures follow the official PHP documentation, with interview questions and a final project to master it all.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages