Skip to content
System nominalUTC --:--:--Articles 041
DEV TRACK Beginner to advanced

Modern PHP, from Syntax to Services

A complete PHP 8 course: types, enums, classes, namespaces, error handling, PDO, PHPUnit, PHPStan, and building a small service with tests and static analysis in CI.

Modules
05
Lessons
15
Reading time
7H 26M
Words
29,939
0 of 15 complete0%

What you will be able to do

  • Read PHP 8 code and know what each type declaration guarantees.
  • Write classes and interfaces that a static analyser can actually check.
  • Handle failures with exceptions and finally instead of suppressing errors.
  • Talk to a database through PDO with transactions and prepared statements.
  • Test a codebase with PHPUnit and hold the line with PHPStan in CI.
  • Ship a small service with a clean request-to-response path.

Before you start

Some programming experience in any language. PHP 8.3 or newer installed, and Composer available on the command line.

Still being written

5 of 6 modules are finished and readable now. The remaining 1 is in progress and will appear here as it is published. Nothing already written is removed, and the lessons below will not change underneath you.

PHP has a reputation problem that stopped being accurate somewhere around version 7.0, and the gap between that reputation and the language you actually write in 2026 costs teams real money. Developers arrive expecting an interpreted template language, find a typed, namespaced, statically analysable one, and spend a month writing 2012 code in it.

This course is written against PHP 8.3 and newer, which is the oldest version worth starting a project on: PHP 8.2 leaves security support in December 2026. It covers the type system as a set of guarantees rather than as decoration, then moves through classes and namespaces into error handling, database access and the two tools that change how a PHP codebase ages: a test suite and a static analyser.

The last module builds a small service that reads a request, validates it, writes to a database inside a transaction and returns a response, with tests around the parts that can be wrong. Nothing here is framework-specific, so what you learn transfers to whatever you use next.

Curriculum

5 modules, 15 lessons

MODULE 03

Functions, classes and namespaces

Signatures, visibility, interfaces, traits, PSR-4 autoloading and dependency direction.

3 lessons · 1H 21M

MODULE 05

Testing and static analysis

PHPUnit, test doubles, PHPStan levels, coding standards and a CI pipeline.

3 lessons · 1H 55M

Go deeper

Articles that pair with this course