Free curriculum
Learn PHP, lesson by lesson
Follow a modern server-side PHP path from syntax and collections to objects, databases, forms, security, Composer, queues, caching, APIs, and deployment.
Core language skills lead into request-oriented web development, then framework, testing, performance, and production delivery concerns.
Complete curriculum
Work in order, or open any lesson as a public reading reference. Interactive practice remains optional.
- Read lesson →
Lesson 1 · basics
Introduction to PHP
Start learning PHP from scratch. Understand why PHP powers millions of websites and write your first server-side script.
- Position
- core · 12 min
- Prerequisites
- None
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 2 · basics
Variables and Data Types
Learn PHP variables and data types including strings, integers, floats, booleans, and type casting for type-safe PHP development.
- Position
- core · 18 min
- Prerequisites
- Introduction to PHP
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 3 · basics
Functions
Learn PHP functions with typed parameters, return types, closures, and arrow functions. Build reusable code blocks for any project.
- Position
- core · 18 min
- Prerequisites
- Introduction to PHP, Variables and Data Types
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 4 · basics
Control Flow
Learn PHP control flow with if/else, switch, match expressions, and loops. Build programs that make decisions and iterate over data.
- Position
- core · 18 min
- Prerequisites
- Introduction to PHP, Variables and Data Types, Functions
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 5 · basics
Arrays and Objects
Master PHP arrays and objects for organizing complex data. Learn indexed arrays, associative arrays, array_map, filter, and reduce.
- Position
- core · 22 min
- Prerequisites
- Introduction to PHP, Variables and Data Types, Functions, Control Flow
- Outcomes
- Data Modeling, Abstraction & Design
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 6 · intermediate
OOP and Classes
Master PHP object-oriented programming with classes, inheritance, abstract classes, interfaces, and constructor promotion.
- Position
- core · 22 min
- Prerequisites
- Introduction to PHP, Variables and Data Types, Functions
- Outcomes
- Abstraction & Design
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 7 · intermediate
Error Handling
Learn PHP error handling with try/catch/finally, custom exception classes, and error reporting for production-ready applications.
- Position
- core · 20 min
- Prerequisites
- Functions, Control Flow
- Outcomes
- Architecture & Maintainability, Security & Robustness
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 8 · intermediate
Working with Databases
Connect to databases with PHP PDO. Learn CRUD operations, prepared statements, parameter binding, and transactions for safe data access.
- Position
- core · 25 min
- Prerequisites
- Functions, OOP and Classes
- Outcomes
- Security & Robustness, Data Modeling
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 9 · intermediate
File Handling
Learn PHP file handling to read, write, and manage files and directories. Process CSV uploads, handle file streams, and manage paths.
- Position
- core · 20 min
- Prerequisites
- Functions, Error Handling
- Outcomes
- Security & Robustness, Data Modeling
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 10 · intermediate
Sessions and Cookies
Manage user state with PHP sessions and cookies. Build login systems, shopping carts, and flash messages across HTTP requests.
- Position
- core · 22 min
- Prerequisites
- Arrays and Objects, OOP and Classes
- Outcomes
- Security & Robustness, Architecture & Maintainability
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 11 · advanced
Laravel Basics
Get started with Laravel, PHP's most popular framework. Learn routing, controllers, Blade templates, and Eloquent ORM basics.
- Position
- core · 28 min
- Prerequisites
- OOP and Classes, Working with Databases
- Outcomes
- Architecture & Maintainability, Abstraction & Design
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 12 · advanced
API Development
Build RESTful APIs with PHP using proper HTTP methods, JSON responses, request routing, and input validation patterns.
- Position
- core · 25 min
- Prerequisites
- OOP and Classes, Error Handling
- Outcomes
- Architecture & Maintainability, Security & Robustness
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 13 · advanced
Authentication and Security
Implement secure PHP authentication with password hashing, CSRF protection, XSS prevention, and SQL injection defense.
- Position
- core · 25 min
- Prerequisites
- Working with Databases, Sessions and Cookies
- Outcomes
- Security & Robustness, Architecture & Maintainability
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 14 · advanced
Deployment
Deploy PHP applications to production. Learn Composer autoloading, environment config, PHP-FPM, nginx, error logging, and opcache.
- Position
- core · 22 min
- Prerequisites
- OOP and Classes, Error Handling
- Outcomes
- Production Delivery, Performance & Runtime
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 15 · advanced
Capstone Project: Blog System
Build a complete blog system with PHP combining authentication, CRUD operations, SQLite database, templates, and a REST API.
- Position
- core · 35 min
- Prerequisites
- Working with Databases, Sessions and Cookies, API Development
- Outcomes
- Architecture & Maintainability, Security & Robustness, Data Modeling
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 16 · intermediate
String Manipulation
Master PHP string functions for searching, formatting, transforming, and parsing text data in web applications.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, Functions, Arrays and Objects
- Outcomes
- Syntax Fluency, Data Modeling
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 17 · intermediate
PHP 8 Features
Explore PHP 8 features including match expressions, named arguments, union types, nullsafe operator, and constructor promotion.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, Functions, Arrays and Objects, OOP and Classes
- Outcomes
- Syntax Fluency
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 18 · basics
Composer And Packages
Learn Composer, PHP's dependency manager. Install packages, manage versions, configure autoloading, and structure modern PHP projects.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, Functions, Arrays and Objects, OOP and Classes
- Outcomes
- Architecture & Maintainability
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 19 · intermediate
Testing With Phpunit
Learn PHP testing with PHPUnit. Write test classes, use assertions, data providers, and mocking for reliable, maintainable code.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, Functions, Error Handling, Composer And Packages
- Outcomes
- Testing & Debugging
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 20 · advanced
Design Patterns
Learn classic design patterns in PHP including Singleton, Factory, Observer, and Strategy with practical, real-world examples.
- Position
- core · 27 min
- Prerequisites
- Variables and Data Types, Functions, OOP and Classes, OOP and Classes, Composer And Packages
- Outcomes
- Abstraction & Design, Architecture & Maintainability
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 21 · intermediate
Form Processing
Learn safe PHP form processing. Read input data, sanitize and validate user submissions, and return meaningful error messages.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, String Manipulation, PHP 8 Features
- Outcomes
- Security & Robustness
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 22 · intermediate
Templating And Views
Separate PHP logic from HTML with templating patterns. Build reusable layouts, partials, and a minimal template engine from scratch.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, String Manipulation, Form Processing
- Outcomes
- Abstraction & Design, Security & Robustness
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 23 · advanced
Queues And Jobs
Implement background job queues in PHP with job interfaces, workers, retry logic, and priority scheduling for async task processing.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, Functions, Design Patterns, Composer And Packages
- Outcomes
- Performance & Runtime, Architecture & Maintainability
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 24 · advanced
Caching And Performance
Learn PHP caching strategies from in-memory arrays to file-based caches. Master TTL expiration, cache invalidation, and profiling.
- Position
- core · 25 min
- Prerequisites
- Variables and Data Types, Functions, Design Patterns, Composer And Packages
- Outcomes
- Performance & Runtime, Architecture & Maintainability
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.
- Read lesson →
Lesson 25 · advanced
Rest Api Best Practices
Design production-grade REST APIs in PHP with consistent response structures, proper HTTP semantics, error handling, and versioning.
- Position
- core · 28 min
- Prerequisites
- Variables and Data Types, Functions, Design Patterns, Form Processing, Composer And Packages
- Outcomes
- Architecture & Maintainability, Security & Robustness
- Runtime / version
- The runner executes modern PHP with the PHP command-line interpreter in a server sandbox.