PHP Programming
Master server-side web development with PHP — 50 lessons from first script to advanced application architecture.
Sign in to track your progress through this course
👋 New to PHP? Great choice for web backends.
PHP powers over 75% of the web. Start with Lesson 1 — we'll build your skills from the ground up.
Beginner Track
✦ Start Here ~2–3 hoursLearn PHP syntax, variables, control flow, and loops — the foundation for any server-side script.
Introduction to PHP
What PHP is, how it runs on the server, and how to write your first script
Variables & Data Types
Strings, integers, floats, booleans — PHP's core data types explained
Operators & Expressions
Arithmetic, comparison, logical, and string operators in PHP
Control Flow
Control program logic with if, elseif, else, and switch
Loops
Repeat code with for, foreach, while, and do-while loops
Intermediate Track
~3–4 hoursWrite functions, handle forms, manage sessions, and work with files to build real dynamic pages.
Functions
Write reusable functions with parameters, return values, and default arguments
Arrays & Collections
Work with indexed, associative, and multidimensional arrays
File Handling
Read, write, and append to files on the server with PHP
Forms & User Input
Handle HTML form submissions, validate user input, and sanitise data
Sessions & Cookies
Persist user data between page loads with sessions and cookies
Expert Track
~3–4 hoursBuild object-oriented PHP, connect to MySQL databases, secure your apps, and create REST APIs.
Object-Oriented PHP
Create classes, objects, interfaces, and use OOP principles in PHP
Database Integration (MySQL)
Connect to MySQL, run queries, and display database data on your page
Security Best Practices
Prevent SQL injection, XSS, and CSRF in PHP web applications
APIs & JSON
Build and consume REST APIs, encode/decode JSON data with PHP
Advanced Track
~12–16 hoursProfessional PHP engineering — architecture, caching, queues, payments, deployment, and testing.
Advanced OOP Patterns: Factory, Singleton, Strategy & Repository
Apply GoF design patterns in production-quality PHP code
Dependency Injection Containers & Service Providers
Build and use DI containers for testable, decoupled PHP applications
Advanced Error Handling & Custom Exception Hierarchies
Custom exception types, global handlers, and error reporting strategies
Working with REST APIs: cURL, Streams & Guzzle
Call external APIs with cURL, streams, and the Guzzle HTTP client
Building Your Own Micro MVC Framework
Build a router, dispatcher, and controller system from scratch in PHP
Middleware Architecture & Request Pipelines
Process HTTP requests through a stack of middleware for auth, logging, and more
Advanced PDO: Transactions, Prepared Statements & Stored Procedures
Use PDO for safe, efficient database access with transactions and stored procs
Query Builders & ORM Concepts (Doctrine/Eloquent Style)
Map database tables to PHP objects with ORM concepts and query builders
Authentication Deep Dive: JWT, OAuth2 & API Tokens
Implement secure login, JWT issuance, and OAuth2 flows in PHP
Securing PHP Applications: XSS, CSRF, SQL Injection & Hardening
Defend against all major PHP vulnerabilities with proven security techniques
Password Hashing, Argon2 & Secure Credential Storage
Hash passwords with Argon2/bcrypt and store credentials safely
Advanced Sessions: Redis, Database Sessions & Stateless Sessions
Scale session storage with Redis, DB-backed sessions, and JWT stateless auth
Caching Techniques: OPcache, Redis & File Caching
Speed up PHP apps with OPcache, Redis object caching, and cache layers
Building Dynamic APIs with JSON, HAL & Pagination
Design paginated, versioned REST APIs with proper JSON response formats
Rate Limiting, Throttling & IP-Based Controls
Protect your API from abuse with rate limiting and throttle middleware
Working with Queues: Redis, Beanstalk, RabbitMQ
Offload slow tasks to background queues with Redis and message brokers
Building Email Systems: SMTP, PHPMailer, DKIM, SPF
Send transactional emails with PHPMailer and configure deliverability
Image Uploads, Processing & Optimisation (GD & Imagick)
Handle user image uploads, resize, crop, and optimise with GD and Imagick
Working with PDF Generation & File Exporting
Generate PDFs, invoices, and reports with TCPDF and dompdf
Localization, Internationalisation & Multilingual Apps
Build multilingual PHP apps with gettext, locale detection, and i18n patterns
Building Search Features (Full-Text Search, Elastic, Meilisearch)
Add full-text search to PHP apps using MySQL FTS, Elasticsearch, or Meilisearch
Cron Jobs, Background Tasks & Scheduling Workers
Automate recurring tasks with cron, worker processes, and job schedulers
Environment Management: env files, Config Services & Secrets
Manage config safely with .env files, vlucas/phpdotenv, and secrets management
Integrating Payment Gateways (Stripe, PayPal, Mollie)
Accept payments in PHP with Stripe Checkout, webhooks, and refund handling
Building E-Commerce Logic: Carts, Orders & Invoices
Model shopping carts, orders, inventory, and invoice generation in PHP
Server-Side Rendering & Template Engines (Twig, Blade-like Patterns)
Separate logic from presentation with Twig and templating best practices
API Rate Monitoring, Logging & Audit Trails
Log API calls, monitor usage, and build audit trails for compliance
Building a Role & Permission System (RBAC, ACL)
Implement role-based access control and fine-grained permissions in PHP
File Storage Abstraction: Local, S3, Cloud Storage
Abstract file storage with Flysystem to switch between local, S3, and cloud
Optimizing PHP Performance & Understanding OPcache
Profile PHP apps, tune OPcache, and eliminate slow code paths
Unit Testing & Integration Testing with PHPUnit
Write unit tests, integration tests, and test doubles with PHPUnit
Building Composer Packages & Publishing Libraries
Create, version, and publish reusable PHP packages on Packagist
Deploying PHP Apps: Nginx/Apache, PHP-FPM, Docker
Deploy PHP applications with Nginx, PHP-FPM, and Docker containers
Building a Complete Real-World PHP Architecture (Modular Monolith)
Structure a full PHP application as a modular monolith with clean boundaries
Final Project
Build and deploy a complete PHP web application from scratch