From Zero Types to Full Type Algebra in 10 Years
In 2015, PHP had no scalar type declarations. By 2025, it had union types, intersection types, DNF types, typed properties, typed constants, enums, readonly properties, property hooks, asymmetric visibility, never, and standalone true/false/null types. That's 17 distinct type system features in 10 years.
| Version | Year | Type Feature |
|---|---|---|
| 7.0 | 2015 | Scalar types, return types, strict mode |
| 7.1 | 2016 | Nullable types (?Type), void, iterable |
| 7.2 | 2017 | object type hint |
| 7.4 | 2019 | Typed properties, covariant returns |
| 8.0 | 2020 | Union types, mixed, static return |
| 8.1 | 2021 | Intersection types, enums, readonly, never |
| 8.2 | 2022 | DNF types, standalone true/false/null |
| 8.3 | 2023 | Typed class constants, #[Override] |
| 8.4 | 2024 | Property hooks, asymmetric visibility |
| 8.5 | 2025 | Pipe operator, clone with, #[NoDiscard] |
And the community backed this up with tooling. PHPStan — a static analyser that catches bugs without running your code — has over 300 million Packagist downloads. 52% of PHP developers use it, according to the JetBrains 2023 Developer Ecosystem survey.
Source: php.net migration guides · Packagist · JetBrains Developer Ecosystem 2023
PHP didn't just add types — it built a complete type algebra, from basic scalar hints all the way to disjunctive normal form. And a whole static analysis ecosystem grew alongside it, catching bugs that unit tests miss.