PHP (8.5)
Modern PHP 8.5 from a first script to secure web apps: types, arrays, strings, objects, errors, Composer, PDO, testing, upgrades and WordPress code.
9 lessons: 5 free with Pro answers and 4 with a free core.
Examples run with PHP 8.5.11.
Who it is for
Web developers maintaining PHP and WordPress sites, and freelancers.
What you will be able to do
- Install PHP 8.5, run scripts from the command line and a local web server, and read every warning and error PHP prints
- Write programs with PHP's values, comparisons, control flow, functions and type declarations
- Store and transform data with arrays, strings, regular expressions, JSON and dates
- Model data with classes, interfaces, traits, enums, readonly properties and property hooks
- Handle errors with exceptions and logs, and organise a project with namespaces and Composer
- Handle requests, forms, cookies and sessions, and escape output so pages are safe
- Query MySQL, PostgreSQL and SQLite safely with PDO, prepared statements and transactions
- Test code with PHPUnit and Pest, and check it with static analysis and coding standards
- Upgrade legacy code to PHP 8.5 and maintain the PHP side of WordPress sites
- Deploy, monitor and hand over PHP applications behind PHP-FPM
Revise and practise
- Practice: every exercise and quiz (9 quizzes)
Modules and lessons
What the labels mean
- Free lesson, Pro answers
- the whole lesson is free; the model answers to its interview questions open with a pass
- Free core, Pro depth
- the core of the lesson is free; its in-depth parts open with a pass
- Pro
- opens with a Pro, Premium or Ultimate pass
Minutes are reading time: “6 of 15 min free” means 6 minutes of the lesson are free.
What a pass opens in this track
10 in-depth parts and 22 interview answers. The same pass opens every other track and every Pro tool.
- Module 1
Start here: PHP in 2026
What PHP is and where it runs, which branches still receive security fixes, installing PHP 8.5, and a first script with the error messages PHP prints.
- What PHP is and where it runs in 2026 Free lesson, Pro answers: 15 minutes
- Install PHP 8.5 and check your setup Free lesson, Pro answers: 10 minutes
- Your first PHP script, the CLI and error messages Free lesson, Pro answers: 15 minutes
- Module 2
Values, variables and types
Variables and constants, integers and floats with safe money maths, strings and heredoc, booleans and null, and how == and === compare values.
- Variables, constants and printing values Free lesson, Pro answers: 10 minutes
- Strings: quotes, escapes, interpolation and heredoc Free core, Pro depth: 6 of 15 minutes free
- Booleans, null and which values count as false Free core, Pro depth: 4 of 10 minutes free
- Module 3
Control flow
if, else and the ternary operator, switch and match, the four loops, and splitting a program into files with include and require.
- if, else, elseif and the ternary operator Free lesson, Pro answers: 15 minutes
- Loops: for, while, do-while and foreach Free core, Pro depth: 6 of 20 minutes free
- include and require: splitting code into files Free core, Pro depth: 7 of 20 minutes free
Related tools
Official documentation
- PHP Manual (The PHP Group (php.net))
- PHP 8.5 release announcement (The PHP Group (php.net))
- Supported versions (The PHP Group (php.net))
- PHP Standards Recommendations (PHP Framework Interop Group (PHP-FIG))