PHP Advent

PHP articles for working developers

Long-form articles on modern PHP, alongside 96 PHP Advent articles by 67 community authors. Free to read, with an RSS feed.

Newest · Tools and testing

Pest PHP in an Existing Suite: Setup, Syntax, and CI

Adopt Pest PHP in an existing PHPUnit test suite without rewriting tests. Install Pest with Composer, write expect assertions, use datasets, and configure CI.

  • Why Adopt Pest Without Rewriting PHPUnit
  • Step 1: Installing Pest with Composer
  • Step 2: Configuring PHPUnit Interoperability in Pest.php
  • Step 3: Writing Tests with test(), it(), and expect()

Read the article

Browse by topic

Archive classics on each topic

The language

Time zones, character sets and object-oriented arrays.

Tools and testing

Profiling, PHPT and xUnit tests, and coding standards.

In production

Safe HTTP methods, automated deploys and legacy code.

The writing that ships with the code counts too: a changelog that promises you won’t “loose” data reads as carelessly as a failing test. Keep a list of commonly confused words close.

96 articles from the PHP Advent calendars

Each December, the PHP community wrote one article a day. The articles stay at their original addresses, credited to their authors.

  • 67 authors, Sara Golemon and Derick Rethans among them
  • Free to reuse under CC BY-SA 3.0 US, with credit to the author
  • Old short links such as /201006 still open

Browse all 96 archive articles

From the archive