New PHP developers
Who want to learn the language properly the first time.

A practical guide to modern PHP, maintainable systems, and production-ready habits
Modern PHP, built the way working systems need it.
This book teaches PHP 8.5 as it is used on real, maintained websites: strict types, tested code, prepared statements, escaped output, safe passwords and sessions, and deployments you can repeat and roll back.
Across 24 chapters you build one small application for a fictional handyman business, Northstar Repairs, with enquiry forms, a database, logins, invoices with VAT in integer pence, background jobs and a production server. The example programs are run on PHP 8.5 every time the book is built, and the output printed in the book is the output they produced.
It assumes you can use a text editor and a terminal, and have built a web page before. It does not assume you know PHP, and it does not teach the old ways first and correct them later.
Who want to learn the language properly the first time.
After years away, who need to know what has changed since PHP 5 and 7.
Building and running sites for UK businesses, who need the production, legal and business chapters as much as the code.
Read Parts 1 and 2 in order; each chapter builds on the one before. Part 3 chapters can be read in any order once you have finished Chapter 16.
Set up properly, learn the language without bad habits, and build your first small programs.
Objects, Composer, databases with PDO, validation and escaping, passwords and logins, errors and logs, and testing, ending with a small but complete application.
What happens after the code works, ending with every check in the book gathered into one production checklist.
Appendix A: PHP 8.0 To 8.5 At A Glance · Glossary · Further Reading · About The Author
Corrections, questions and suggestions for the next edition are welcome at hello@phpair.co.uk.