Repository navigation
++PHP 2026.3.1
++PHP 2026.3.1
The first Stable release of ++PHP lets you introduce stronger compile-time contracts one file at a time in an existing PHP project. Keep ordinary .php files and compile selected .ppphp files into ordinary PHP for deployment.
Language and Build
- Use explicitly typed mutable and readonly locals, typed loop bindings, union and intersection types, erased generics, typed lists and maps, checked errors, and value-producing
whenexpressions. - Check PHP and ++PHP files together. Composer dependencies contribute declaration information without running application code during analysis.
- Build a complete output tree with source maps and a manifest. A failed build preserves the last successful output. Repeated builds can reuse verified results and report when files were reused.
Changes Since RC-2
- Console diagnostics lead with the original source location and specific cause. Diagnostic codes and editor ranges are unchanged.
- Native compiler commands default to a 512 MiB memory allowance without changing
php.ini. SetPPPHP_COMPILER_MEMORY_LIMIT_MEGABYTESto choose a different limit. - Checks and builds use less memory by deferring unused token streams and releasing dependency implementation bodies after discovery. Dependency discovery follows declaration contracts instead of recursively loading unrelated implementations.
whenexpressions preserve PHP evaluation order, reference bindings, and control flow through nested loops, switches, andfinallyblocks.- Browser integrations can run the compiler's Check and Build operations and reuse verified build results for unchanged inputs.
Compatibility and Deployment
- The compiler requires PHP
^8.4and Composer 2. Generated applications target PHP 8.4. - Generated PHP needs no ++PHP runtime package. Deploy the generated tree with your project's Composer metadata and runtime dependencies. Keep hand-written files outside the configured output directory.
- Native
checkandbuildinclude supplemental PHPStan analysis. The compiler's editor and browser protocols are integration surfaces. There is no standalone language server or formatter in this release. - Immutable Records, postfix list types, scalar and collection members, and attribute factory expressions are future work and are not part of this release.
Upgrade Notes
If you installed RC-2, use the installation command below to replace your exact prerelease constraint. Then rebuild your generated output with the new compiler. If you used the original atatusoft-ltd/ppphp-src Composer package name, follow the package migration instructions and select Stable when installing atatusoft/ppphp.
Report bugs through GitHub Issues and include the output of vendor/bin/ppphp --version. Follow the security policy linked below to report vulnerabilities privately.
Install This Release
Channel: Stable. Select this exact version explicitly:
composer require --dev atatusoft/ppphp:2026.3.1