Free · No sign-up · Real PHP 8.5
Small steps. Real code.
Short lessons where every one ends in a program you write, run and check right on the page. PHP runs inside your browser, so there is nothing to install and your code never leaves your device.
- 99 interactive lessons
- 380 function pages
- Progress saved in your browser
$colors = ["red", "green", "blue"];
$colors[] = "yellow";
echo count($colors), " colors, last: ", $colors[3];4 colors, last: yellow
How every lesson works
Read one idea
One concept explained in about ten minutes, with examples that were run before the page was published.
Write real PHP
Edit the starter code and run it as often as you like. Every run starts a fresh PHP 8.5 runtime in your browser.
Pass the checks
Checks test what your function returns. Pass them all to complete the lesson; your progress stays in this browser.
The PHP path: 100 lessons in 8 stages
See every lesson →Continue where you left off
- Stage 1 · Lessons 1–13Foundations
Variables, types, operators, conditions, strings, arrays, loops and functions.
13 lessons available - Stage 2 · Lessons 14–19Functions and types
Type declarations, closures, arrow functions, null handling and exceptions.
6 lessons available - Stage 3 · Lessons 20–25Objects
Classes, constructors, inheritance, interfaces, traits and enums.
6 lessons available - Stage 4 · Lessons 26–30Working with data
JSON, input validation, regular expressions, dates and namespaces.
5 lessons available - Stage 5 · Lessons 31–39Strings in depth
Formatting, searching, replacing, padding and escaping output safely.
9 lessons available - Stage 6 · Lessons 40–59Control flow and arrays in depth
Strict comparisons, match, loop control, sorting, grouping and sets.
20 lessons available - Stage 7 · Lessons 60–83Functions, types and classes in depth
Recursion, references, union types, readonly classes and composition.
24 lessons available - Stage 8 · Lessons 84–100Modern PHP in practice
Enums, error handling, JSON, iterators, generators and reflection.
16 lessons available
Beyond the lessons
Signatures, edge cases and common mistakes, with examples executed on PHP 8.5 before publishing.
Browse the reference →What changed in each PHP versionLanguage changes release by release, with earlier and current code side by side.
See PHP 8.5 changes →Frameworks, CMS and runtimes72 guides to PHP frameworks, content platforms and ways to run PHP, with official links and dated repository status.
Explore the ecosystem →Compiled to WebAssembly and run in a worker. Nothing is sent to a server.
Every example and solution runs on the same engine you use here.
Each page links the official PHP documentation it was checked against.