The Daily Commit · Section Edition Front Page PHP AI Dev EN DE FR ES

The Php Times

Releases — Ecosystem

PHPStan 2.2.6 ships optional native extension for faster analysis


PHPStan 2.2.6 introduces an optional C++ extension for PHP 8.3+ that speeds up analysis by 10-30%.

R/PHP (TOP), July 27, 2026 curated by Sönke

Prebuilt binaries ship with the Composer package for Linux, macOS and Windows; phpstan.phar users can install it via PIE as phpstan/turbo.

PHPStan 2.2.6 ships a new native PHP extension written in C++ that accelerates the static analyser by 10 to 30 percent. It requires PHP 8.3 or newer.

The Composer package already contains prebuilt binaries for the most common platforms: Linux with glibc or musl on x86_64 and arm64, macOS, and Windows on x86_64. PHPStan automatically loads the binary matching the runtime into its worker processes, so users do not need to configure anything.

Users who run a manually downloaded phpstan.phar can install the extension through PIE with `pie install phpstan/turbo`.

The extension activates only when its version matches what the installed PHPStan release expects. On a mismatch, PHPStan prints a note and runs without it, meaning an outdated extension can affect speed but never analysis results.

Only a few hot paths have been rewritten natively so far, leaving room for larger gains if more components are ported. The extension is fully optional: PHPStan keeps working without it. When enabled, it shadows specific classes that are marked with the #[ShadowedByTurboExtension] attribute.

Read the original source ↗

Rate this article: 0

Readers’ Forum

No contributions yet — open the debate.

← Ecosystem — Page B1

"All the Code That's Fit to Ship" · The Daily Commit · Screen edition · Imprint · Privacy Policy