phpstorm.dev

PHP ecosystem insights

PHP knowledge

Versioned PHP knowledge with primary sources and explicit verification dates.

Source checks through 2026-10-27 · 57 sources · This published snapshot is over 48 hours old.

Verified 2026-10-06 Permanent entry

PHPStan 2.3.0 performance, bleeding-edge generics and unused-variable checks

PHPStan 2.3.0 was published on GitHub on 6 October 2026 at 06:33 UTC, the first minor release after the 2.2.x series, which 2.2.17 closed. The release notes say it fixes 75 issues. The tagged composer.json still requires PHP ^7.4|^8.0, so the minimum PHP version for running PHPStan is unchanged.

Performance

The release blog post measures the analysis of WordPress core on the author's M1 Pro laptop. It took 60.51 s with 2.1.33 (December 2025) and takes 19.47 s with 2.3.0 without PHPStan Turbo, or 7.93 s with it. PHPStan Turbo is an optional C++ extension that first shipped in 2.2.6. Its binaries are bundled in the phpstan/phpstan package, and PHPStan restarts itself with the extension enabled when a matching binary exists. The blog says most users therefore get it automatically. In 2.3.0 Turbo shadows most of the analyser engine.

The result cache is now thrown away entirely only when PHPStan or the project's PHPStan configuration changes. It used to be invalidated by any Composer dependency update or any change to the Symfony DI container. Dependencies between analysed files and installed packages are now tracked, and new extension APIs let extensions declare their own invalidation. The notes deprecate ResultCacheMetaExtension.

Bleeding edge only

These features take effect only with vendor/phpstan/phpstan/conf/bleedingEdge.neon included. The release notes say that file has no backward-compatibility guarantees.

Other changes

A non-bleeding-edge @pure-unless-parameter-passed PHPDoc tag was added. Scope::getPhpVersion() now honours the require.php constraint in composer.json, and PHP-version-dependent checks use it. Mutually exclusive flag groups are now declared for json_encode, json_decode, filter_var, filter_input, openlog and ZipArchive::open. Rector 2.7.0, released the same day, requires phpstan/phpstan ^2.3.0.

2.3.1 follow-up: smaller package

PHPStan 2.3.1 was published on 8 October 2026 at 21:10 UTC. Its notes say 2.3.0 was 104 MB to download and 268 MB unzipped in vendor/. 2.3.1 is just under 28 MB to download and 87 MB unzipped, because the Turbo extension now ships as one shared core plus a thin extension per PHP version (#6703). Linux ZTS Turbo binaries are now built for PHP 8.3–8.5, and phpstan/turbo (the PIE package) allows PHP 8.6. The other changes are bug fixes (for example constructor throw points and result-cache handling of functions) and three performance fixes, two of them for the result cache.

2.3.2 follow-up: PHP 8.6 support and Turbo notice

PHPStan 2.3.2 was published on 24 October 2026 at 11:37 UTC. PHP 8.6 items in its notes: ARRAY_FILTER_USE_VALUE accepted as the array_filter() mode with a narrowed result (#6681), a dynamic return type extension for clamp() (#6684), CURLINFO_SIZE_DELIVERED and the size_delivered key in curl_getinfo() return types (#6683), and reading PHP 8.6 thread-safe EG()/CG() through exported offsets (#6785). Other improvements: unused function parameters prefixed with _ are ignored (#6743), phpstan.phar tells the user when it runs without the Turbo extension (#6719), @api is respected on class constants and traits in the API rules, and BetterReflection moves from 6.73.0 to 6.75.0. Performance changes include restarting the process when pcov or tideways is loaded (#6757), an own multi-extension restart manager and lower memory and time for large array literals (#6778). In bleeding edge only, BackedEnum::from()/tryFrom() parameter types take the backing type into account (#6790). The remaining entries are type-inference and signature bug fixes.

2.3.3 follow-up: new regex parser

PHPStan 2.3.3 was published on 27 October 2026 at about 14:11 UTC. It replaces the Hoa-based parser used to infer preg_match()/preg_match_all() result shapes with a regex parser generated by phplrt (#6851). The same change fixes several inferred shapes: regex assertions are zero-width, groups in negative assertions are never set, conditional subpatterns and quantified atoms that can match an empty string are handled, MARK with PREG_PATTERN_ORDER is an array keyed by match index, and no shape is inferred for patterns with subroutine calls or for some duplicate group name and branch reset cases. The release notes also list PHP 8.2 support in the Turbo extension (#6825), a phpdoc-parser update with printer fixes, literal types for word date-format characters (#6838), and bug fixes including a bootstrap autoloader's exception no longer aborting the analysis (#6294) and generic static types resolved inside the class, in properties and in class constants (#6826).

Evidence and limitations

Related: package signals, PHPUnit 13.4.0.