PHP
Full PHP course — 263 topics from the basics to advanced use.
Lessons
- What is PHP and How It Runs
- Installing and Configuring PHP on Windows, Linux, and macOS
- Variables, Constants, Scope, and References in PHP
- PHP's Type System: A Complete Reference
- Type Declarations, strict_types, and Type Juggling
- PHP Operators: Arithmetic to Null-Coalescing Assignment
- PHP Strings: Quoting, Interpolation, Encoding, and String Functions
- PHP Arrays: Ordered Maps, References, and the array_* Toolkit
- PHP Control Flow: Branching, Looping, and Guard Clauses
- PHP Functions: Parameters, Closures, Arrow Functions, and Generators
- Null Coalescing, Nullsafe Chaining, Destructuring, and Unpacking
- Pure and Backed Enums: Cases, Methods, Interfaces, and Serialization
- Attributes: Declarative Metadata, Targets, and Reflection
- Attributes — Runtime Reflection and Framework Patterns
- Readonly Properties and Classes: Immutability, Promotion, and Cloning
- Advanced Types: never, mixed, static/self/parent, Unions, Intersections and DNF
- Modern Control Flow, String and Array Improvements, and Deprecations
- Generators and Lazy Iteration: yield, yield from, and Memory-Efficient Processing
- Generators — send(), throw(), and Pipelines
- Fibers: Cooperative Concurrency, Suspension, and Resumption
- Fibers — Event Loops and Async Ecosystems
- Reflection: Inspecting and Manipulating PHP at Runtime
- Reflection — Advanced Metadata and Framework Use
- Magic Methods: Construction, Properties & Calls
- Magic Methods: Serialization, Strings & Cloning
- Object Cloning, Comparison & Anonymous Classes
- Late Static Binding, Closures & Copy-on-Write
- Classes and Object Basics: Properties, Methods, Constructors, Visibility
- Encapsulation and Inheritance: Protecting State, Extending Behavior
- Interfaces and Traits: Contracts, Abstract Classes, and Code Reuse
- Composition Over Inheritance and Dependency Injection
- Static State and Late Static Binding
- SOLID Principles in PHP
- Creational Design Patterns
- Structural Design Patterns
- Behavioral Design Patterns
- Value Objects, DTOs, Entities and the Domain Model Toolkit
- Namespaces: Organizing Code and Resolving Names
- Autoloading: From require Chains to PSR-4 and Composer
- Composer: PHP's Dependency Manager
- Composer — Dependency Resolution and Production Optimization
- Composer Version Constraints: Ranges, Caret, Tilde, and Stability
- Authoring a Composer Package: PSR-4, Docs, Licensing, and Versioning
- PHP-FIG and the PSR Standards: A Reference Guide
- Parse Errors, Runtime Errors, and the Throwable Hierarchy
- try/catch/finally, Custom Exceptions, and Rethrowing
- error_reporting, display_errors, and log_errors
- Xdebug: Breakpoints, Stepping, Coverage, and Profiling
- Logging Practices, Correlation IDs, and Avoiding Sensitive Data in Logs
- HTTP Fundamentals: How the Web Talks
- HTTP Methods: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
- HTTP Status Codes: 1xx Through 5xx
- HTTP Headers: Content Negotiation, Auth, Caching, and CORS
- PHP Request Handling: Superglobals and Raw Input
- HTML Forms: Validation, Repopulation, and CSRF
- Cookies: setcookie() and Secure Attributes
- PHP Sessions: State, Storage, and Security
- Sessions — Locking, Custom Handlers, and Stateless Alternatives
- Secure File Uploads in PHP
- Files and Streams: I/O, Locking, and php:// Wrappers
- JSON in PHP: Encoding, Decoding, and API Serialization
- PHP Serialization: serialize/unserialize, Magic Methods, and Object Injection
- The Front Controller Pattern: One Entry Point, One Bootstrap
- Routing: Matching URLs and HTTP Methods to Code
- Middleware: The Request/Response Pipeline
- PSR-7: HTTP Messages, Immutability, and Streams
- PSR-15 Middleware Pipelines and PSR-18 HTTP Client Interfaces
- Server-Side Rendering with PHP Templates: Layouts, Partials, and Progressive Enhancement
- Relational Database Concepts
- SQL: Querying and Modifying Data
- PDO: Connecting and Querying Safely
- PDO — Savepoints, Streaming, and Connection Resilience
- Working Across MySQL/MariaDB, PostgreSQL, and SQLite
- SQL Injection: Prepared Statements and Safe Dynamic Queries
- Transactions: begin/commit/rollback, ACID, and Isolation
- Indexes: Primary, Unique, Composite, and Reading Query Plans
- Performance: N+1 Queries, Batching, Pagination, and Slow Queries
- Migrations, Seeders, Fixtures, and Safe Schema Evolution
- ORM Concepts: Entities, Repositories, and Query Builders
- Concurrency: Race Conditions, Locking, and Idempotency
- PHP 8.4 and PHP 8.5 Modern Language Features
- Property Hooks (PHP 8.4+)
- Asymmetric Property Visibility (PHP 8.4+)
- Lazy Objects (PHP 8.4+)
- SPL — Standard PHP Library: Interfaces, Iterators, and Data Structures
- PHP Runtime and the Zend Engine
- PHP Memory Model: zvals, References, and Garbage Collection
- OPcache and JIT: Caching, Configuration, and Just-In-Time Compilation
- Streams: Wrappers, Filters, Contexts, and Custom Protocols
- Output Buffering: Capturing, Transforming, and Streaming Responses
- PCRE and Regular Expressions: Syntax, Functions, and Performance
- Unicode and mbstring: Bytes, Characters, and Safe Text Handling
- The Intl Extension: Locale-Aware Formatting and Sorting
- Randomness and Cryptography: CSPRNGs, Password Hashing, and Encryption Basics
- Sodium: Modern, Misuse-Resistant Cryptography in PHP
- FFI: Calling Native C Libraries from PHP
- Phar: Packaging a PHP Application into a Single Archive
- How PHP-FPM Actually Runs Your Application
- Comparing PHP Deployment Architectures
- Building Command-Line Applications with PHP
- Process Control and Signal Handling with pcntl
- Networking with Sockets: TCP, UDP, and Stream Sockets
- Event-Driven PHP: Event Loops, ReactPHP, Swoole, and Long-Running Workers
- HTTP Internals: Protocol Versions, Caching, and Streaming
- Advanced Web Security: A PHP Threat Catalog
- Database Internals: Isolation, MVCC, Locking, and Replication
- XML in PHP: DOM, SimpleXML, XMLReader/Writer, XPath, and Security
- Processing HTML with the DOM: Traversal, XPath, and Sanitization
- Image Processing: GD, Thumbnails, EXIF, and Upload Safety
- Sending Email from PHP: SMTP, Providers, Deliverability, and Queues
- Dependency Injection in Depth: Containers, Autowiring, and Lifetimes
- The PSR Ecosystem: PHP-FIG Standards One by One
- Static Analysis: PHPStan, Psalm, and Gradual Typing for Legacy Code
- The Code Quality Toolchain: Formatting, Linting, Refactoring, and Gates
- Mutation Testing: Measuring How Good Your Tests Actually Are
- Contract Testing: Verifying API Shape Without Running Both Services
- Observability — Structured Logs, Metrics, Traces, and the Four Golden Signals
- Long-Running PHP Applications — Workers, Memory Leaks, and Alternative Runtimes
- PHP Extension Development — From the Zend Engine to a Loadable Shared Library
- PHP Migration Across Versions — From PHP 5 to PHP 8.5 Without Breaking Production
- PHP 8.5 Complete Update — Pipe Operator, Clone With, and Everything New
- PHP Extension Ecosystem — A Map of Core, Bundled, and Common Extensions
- MVC: Model, View, Controller
- Layered Architecture: Presentation, Application, Domain, Infrastructure
- Clean Architecture
- Hexagonal Architecture (Ports and Adapters)
- Domain-Driven Design — Entities, Value Objects, Aggregates, and the Ubiquitous Language
- DTOs, Serializers, Validators, and Mappers — Keeping API Shapes Separate from the Domain Model
- Repository Pattern — Collection-Like Persistence, Query Boundaries, and Why Generic Repositories Fail
- Service Layer: Workflow Orchestration and Transaction Boundaries
- Feature-Based Structure, Modularity, and Bootstrap Design
- Service Containers: Bindings, Lifecycles, Autowiring, and Circular Dependencies
- REST Principles: Resources, URLs, Methods, Statelessness & Idempotency
- The API Request Pipeline: Routing, Middleware, Auth, and Layered Architecture
- Validation: Required Fields, Types, Ranges, Formats, and Cross-Field Rules
- API Errors: Consistent Schemas, Status Codes, Field Errors, and Correlation IDs
- Pagination: Offset, Cursor, and Keyset Strategies
- Filtering, Sorting, Searching & Field Selection with Safe Dynamic SQL
- API Versioning — URL, Headers, Content Negotiation, and Deprecation
- OpenAPI (Swagger) — Describing Endpoints, Schemas, and Generating Clients
- GraphQL — Schema, Resolvers, Authorization, Complexity, and the N+1 Problem
- Webhooks — Signatures, Replay Protection, Idempotency, and Retries
- Server-Sent Events (SSE) — One-Way Streaming with text/event-stream
- WebSockets — Persistent Connections, Authentication, and Scaling
- Building Resilient API Clients — Timeouts, Retries, TLS, and Circuit Breakers
- Authentication vs. Authorization — Identity, Sessions, Tokens, and Access Control
- Password Hashing — password_hash(), password_verify(), Argon2id, and Rehashing
- Secure Login and Logout — Session Regeneration, Enumeration Resistance, and Rate Limiting
- Password Reset and Email Verification — Single-Use Tokens, Hashing, and Enumeration-Resistant Responses
- RBAC: Roles, Permissions, and Authorization Middleware
- ABAC and Policy-Based Authorization: Ownership and Tenant Boundaries
- OAuth 2.0: Authorization Code Flow with PKCE
- OpenID Connect: ID Tokens, UserInfo, and Discovery
- JWT: Structure, Claims, Key Management, and Algorithm Confusion
- Threat Modeling: Attack Surface, Trust Boundaries, and Secure Defaults
- Cross-Site Scripting: Reflected, Stored, DOM-Based, and Context-Sensitive Encoding
- CSRF: Synchronizer Tokens, SameSite Cookies, Double-Submit, and APIs
- SQL/Command Injection, Path Traversal, LFI/RFI, SSRF, and Unsafe Deserialization
- File Upload Security: MIME Sniffing, Storage Isolation, and Decompression Bombs
- Session Fixation and Hijacking: Attack Walkthroughs and Cookie-Level Defenses
- Clickjacking and the Defensive Header Set: Frame-Ancestors, HSTS, and More
- CORS: Same-Origin Policy, Preflight Requests, and the Wildcard-Plus-Credentials Trap
- Cryptography Fundamentals — Hashing, HMAC, and Encryption in PHP
- Secrets Management — Environment Variables, Secret Managers, and Rotation
- Dependency and Supply-Chain Security — Composer Audit, Lock Files, and Update Strategy
- Secure Logging and Privacy — What Must Never Reach a Log File
- PHP Templates: Escaping Discipline, Layouts, Components, and Partials
- Email in PHP: Composing Messages, Alternatives, and Attachments
- CSV in PHP: fgetcsv/fputcsv, Streaming Large Files, and Malformed Data
- XML in PHP: A Quick Tour, and Where to Go Deeper
- YAML in PHP: Configuration, Parsers, and Untrusted-Input Safety
- Working with Images in PHP: A Quick Map of GD and Imagick
- Unicode and UTF-8 in PHP: Bytes vs. Characters, Quickly
- Internationalization and Localization: Orientation, Then Right-to-Left Text
- Working with DateTime and DateTimeImmutable
- UTC Versus Local Time, DST, and the Timezone Database
- Common Date/Time Pitfalls and How to Avoid Them
- The Testing Pyramid — Balancing Unit, Integration, and End-to-End Tests
- PHPUnit Fundamentals — Installation, Assertions, Fixtures, Data Providers, and Coverage
- Test Doubles — Mocks, Stubs, Spies, Fakes, and Avoiding Over-Mocking
- Integration Testing — Databases, Filesystems, HTTP Clients, Queues, Cache, and Containers
- API and End-to-End Testing — HTTP Assertions, Auth Flows, and Browser Workflows
- Static Analysis in the Quality Pipeline
- Code Style and Linting Essentials
- Using Mutation Testing to Improve a Test Suite
- Test Architecture: Fixtures, Factories, and Deterministic Tests
- Performance Fundamentals: Where PHP Requests Actually Spend Time
- OPcache for Performance: The Essentials for Tuning
- PHP-FPM Capacity Planning: Sizing Workers for Throughput
- Profiling PHP Applications: Flame Graphs, Sampling, and Call Data
- Memory Management for Performance
- Caching Strategies
- Redis and Memcached Concepts
- Background Queues and Job Processing
- Rate Limiting: Fixed Window, Sliding Window, and Token Bucket
- Horizontal Scaling: Stateless PHP and Shared Infrastructure
- CDN, HTTP Caching, Compression, and HTTP/2/3 Awareness
- Database Scaling: Read Replicas, Connection Limits, and Partitioning
- The CLI Foundation Automation Scripts Build On
- Structuring Real Console Applications: Subcommands, Help, Input, and Progress
- Writing PHP Scripts Safe to Run Unattended From Cron
- Worker Process Lifecycle and Restart Strategies
- Async Programming Concepts
- Fibers and the Async Library Ecosystem
- Why Use a Framework Instead of Raw PHP
- Laravel Fundamentals: Routing, Controllers, Middleware, Requests, Blade, and Eloquent
- Laravel Advanced Features: Database, Auth, Queues, Events, and the Service Container
- Symfony Fundamentals: Routing, Controllers, Services, and Twig
- Symfony Advanced Components: Doctrine, Events, Messenger, Security, and More
- Laminas, Mezzio, and Composable PSR-Oriented PHP Ecosystems
- Building Applications Without a Full Framework
- Designing, Versioning, and Maintaining a PHP Package
- Zend Engine Architecture: The Pipeline Shape
- Zvals and Runtime Values: A Quick Recap
- OPcache Internals: What Opcode Reuse Actually Saves
- Working with PHP Extensions: Built-in, PECL, and Compatibility
- FFI: Practical Overview -- Shape, Use Case, and Why It's Rare
- Environment Configuration: .env Files, Typed Config, and Startup Validation
- Git Workflow for PHP Projects: Commits, Branches, Reviews, and Secrets
- Continuous Integration for PHP: Lint, Static Analysis, Tests, and Security Audits
- Continuous Deployment: Shipping a CI Artifact Safely to Production
- Docker for PHP: Building CLI and PHP-FPM Images the Right Way
- Docker Compose for Local PHP Development
- Serving PHP in Production with Nginx and PHP-FPM
- Running PHP Under Apache: mod_php, FPM, and Rewrite Rules
- TLS Certificates, HTTPS, and Secure Cookies in Production
- Blue-Green Deployment, Rolling Deployment, and Safe Database Migrations
- Load Balancers and Building Stateless PHP Applications
- Object Storage: S3-Compatible Stores, ACLs, Signed URLs, and Lifecycle Policies
- Event-Driven Architecture at Scale: Producers, Consumers, and Delivery Guarantees
- Message Broker Concepts: Ordering, Consumer Groups, Retries, and Dead-Lettering
- Idempotency Keys: Making Retries Safe
- Distributed Locks: Coordinating Across Multiple Servers
- Eventual Consistency: Living With Stale Reads
- Multi-Tenancy Models: Database-per-Tenant, Schema-per-Tenant, and Shared Tables
- Tenant Security: Preventing Cross-Tenant Data Leakage
- Observability Across Cloud Infrastructure and Operational Boundaries
- Structured Logging in Depth: Levels, Context, and Rotation
- The Metrics Catalog Every Production PHP App Should Expose
- Distributed Tracing: Understanding and Instrumenting Spans
- Capturing, Grouping, and Alerting on Errors in Production PHP
- Liveness vs Readiness: Building Health Checks That Don't Lie
- Backups, Disaster Recovery, Incident Response, and SLOs
- Recognizing Legacy PHP: Red Flags in Inherited Codebases
- A Practical Strategy for Migrating a Legacy PHP Application
- Version Compatibility in Practice: Manual, Composer, and Frameworks
- Integrating Payments Safely: Charges, Webhooks, and PCI Scope
- Building Search: From Database LIKE to Dedicated Search Engines
- Reporting Safely: Async Jobs, CSV Streaming, and Scheduled Reports
- Building Audit Logs: Who Did What, When, and to What
- Notification Systems: Channels, Queues, Templates, and Preferences
- Storage Abstraction: Coding Against an Interface, Not a Provider
- Building a Command-Line Calculator in PHP
- Building a Student Management System with PDO
- Building a Secure Authentication System
- Project Walkthrough: Building a REST API for a Tasks Resource
- Project Walkthrough: Building a Blog Platform with Comments and Moderation
- Project Walkthrough: Building an E-Commerce Backend with Transactional Order Placement
- Project Walkthrough: Building a URL Shortener
- Project Walkthrough: Building a Queue System from Scratch
- Project Walkthrough: Building a Multi-Tenant SaaS Backend
- Capstone Project: Designing, Building, Securing, and Operating TaskForge — a Production-Grade PHP SaaS Platform
- The PHP Project Ladder: 14 More Projects to Build