La Gazette de Saint-Glinglin

Learn PHP 8 from scratch

New to PHP? Learn the basics of the language, objects, Composer's autoload and a router, without a framework, by putting a small village's gazette online.

39 exercises 6 chapters 5,100 XP About 13 h of practice

To get started

Chapter 1 · exercise 1

Hello Saint-Glinglin

Start the track

€29.00 €19.00 Incl. VAT, lifetime access

Founder price, 100 places left.

Buy the track

First chapter free with an account.

01

Today's front page Free

6 exercises · 600 XP · ≈ 1 h 45 min · course notes
  1. Exercise 1: Hello Saint-Glinglin 15 min · 100 XP
  2. Exercise 2: The date in the masthead 15 min · 100 XP
  3. Exercise 3: Today's articles 20 min · 100 XP
  4. Exercise 4: The top story 20 min · 100 XP
  5. Exercise 5: The standfirst 20 min · 100 XP
  6. Exercise 6: One function per article 20 min · 100 XP

What chapter 1 teaches →

02

The newsroom gets organized 🔒 Full track

9 exercises · 1,100 XP · ≈ 3 h 15 min · course notes
  1. Exercise 1: The Article class 25 min · 100 XP
  2. Exercise 2: A title that stays put 20 min · 100 XP
  3. Exercise 3: Sections 20 min · 100 XP
  4. Exercise 4: Who wrote this? 20 min · 100 XP
  5. Exercise 5: A photo for the front page 20 min · 100 XP
  6. Exercise 6: Articles and classified ads 30 min · 150 XP
  7. Exercise 7: A price that holds up 25 min · 150 XP
  8. Exercise 8: The table of contents 20 min · 150 XP
  9. Exercise 9: Bylines 20 min · 150 XP

What chapter 2 teaches →

03

Too many requires 🔒 Full track

4 exercises · 500 XP · ≈ 1 h 30 min · course notes
  1. Exercise 1: One file per class 20 min · 100 XP
  2. Exercise 2: Class not found 20 min · 150 XP
  3. Exercise 3: My first autoloader 20 min · 100 XP
  4. Exercise 4: Namespaces 25 min · 150 XP

What chapter 3 teaches →

04

Composer takes over 🔒 Full track

4 exercises · 450 XP · ≈ 1 h · course notes
  1. Exercise 1: Reading a composer.json 15 min · 100 XP
  2. Exercise 2: Declaring PSR-4 15 min · 100 XP
  3. Exercise 3: Goodbye, homemade autoloader 10 min · 100 XP
  4. Exercise 4: Subfolders 20 min · 150 XP

What chapter 4 teaches →

05

Every article gets its address 🔒 Full track

9 exercises · 1,250 XP · ≈ 3 h · course notes
  1. Exercise 1: Installing a router 10 min · 100 XP
  2. Exercise 2: The newsroom moves out 15 min · 100 XP
  3. Exercise 3: Functions without a name 20 min · 150 XP
  4. Exercise 4: The front controller 20 min · 150 XP
  5. Exercise 5: One page per article 25 min · 150 XP
  6. Exercise 6: Sections online 25 min · 150 XP
  7. Exercise 7: Lost in the post 20 min · 150 XP
  8. Exercise 8: The missing article 20 min · 150 XP
  9. Exercise 9: An exception with its own name 20 min · 150 XP

What chapter 5 teaches →

06

The Gazette is online 🔒 Full track

7 exercises · 1,200 XP · ≈ 3 h · course notes
  1. Exercise 1: A first template 25 min · 150 XP
  2. Exercise 2: The article template 20 min · 150 XP
  3. Exercise 3: A shared layout 20 min · 150 XP
  4. Exercise 4: Posting a classified ad 30 min · 200 XP
  5. Exercise 5: No traps in the ads 20 min · 200 XP
  6. Exercise 6: Searching the gazette 30 min · 150 XP
  7. Exercise 7: Controllers as classes 30 min · 200 XP

What chapter 6 teaches →

Learn PHP 8 by writing code

This course teaches PHP by writing code, not by watching videos. Every exercise runs in the browser, with nothing to install: PHP runs inside the page, the preview of the site updates while you code, and automated tests tell you whether each objective is met.

The common thread: the gazette of Saint-Glinglin, a small French village. It starts as a page that says “Hello” and ends up as a real website, with one page per article, sections, a classified ads form and a search, all without a framework.

What you will learn

  • the basics: variables, arrays, loops, conditions and functions;
  • object-oriented programming in PHP 8: classes, promoted properties, readonly, enums, interfaces, and the property hooks of PHP 8.4;
  • array functions and arrow functions;
  • organizing code: one file per class, autoloading, namespaces;
  • Composer: composer.json, PSR-4, installing a dependency;
  • a router, a front controller, HTTP status codes and exceptions;
  • templates, GET and POST forms, validation and protection against XSS vulnerabilities.

Each exercise only adds a few concepts at a time, and you use them right away on the site. Each chapter ends with a course summary to keep, as a web page and as a PDF.

Who it is for

For anyone starting out with PHP, or who learned it a long time ago and wants to catch up with PHP 8. A little HTML is all you need. By the end, you will know what a framework like Symfony does for you, and the Symfony course will be the natural next step.

The first chapter is free with an account.