php version guide
Feature Availability Table
Use a version table during maintenance to distinguish syntax availability from team adoption. A feature can be available in PHP while still being unavailable to an application whose production baseline is older.
Use This Reference When
- Check the production baseline before using new syntax.
- Check CI, static analysis, coding standards, and local tooling.
- Record compatibility constraints in Composer.
Selected Features
| Feature | First available |
| --- | --- |
| Scalar declarations and return types | PHP 7.0 |
| Typed properties | PHP 7.4 |
| Union types and attributes | PHP 8.0 |
| Enums and readonly properties | PHP 8.1 |
| Readonly classes | PHP 8.2 |
| `#[\Override]` | PHP 8.3 |
| Property hooks | PHP 8.4 |
| Pipe operator | PHP 8.5 |
A production upgrade needs more than a table: read every intervening migration guide and execute the application checks.
Practice
Record an Application Baseline
Choose a sample application baseline and list three features that are available and three that must wait.
Show solution
Compare each feature’s first version with the declared Composer PHP constraint and actual production runtime.