PHP 7.4

7.4 released 28 November 2019, latest 7.4.33.

PHP 7.4 reached end of life on 28 November 2022.

What changed

PHP 7.4 added typed properties, arrow functions, the null-coalescing assignment operator, numeric-literal separators, array unpacking, weak references, custom object serialization hooks, and limited function return-type covariance and parameter-type contravariance. It also introduced performance-oriented capabilities such as OPcache preloading and the Foreign Function Interface, although both require operational review before production use. The cycle deprecated several older constructs, notably curly-brace syntax for string and array offsets and relying on left-associative nested ternary expressions, which should be rewritten before a later upgrade.

What staying costs

PHP 7.4 has reached end of life, so defects and security issues in the runtime no longer receive vendor fixes. Remaining on it increases exposure when the application processes untrusted input, handles authentication or payments, or runs alongside internet-facing services. The practical migration burden also grows as operating-system images, extensions, frameworks, and Composer packages drop compatibility with this runtime. Teams can become locked into older dependency versions and may have to maintain unsupported containers or build tooling simply to keep deployments working.

What to do

Treat the move as an application and dependency upgrade, not only a runtime replacement. Inventory deployed PHP versions, extensions, Composer dependencies, framework requirements, and any native integrations; then select a currently supported PHP target that is compatible with the application stack. Run the full automated test suite and static analysis on that target, first fixing code that PHP 7.4 deprecated and then addressing incompatibilities reported by the newer runtime. Pay particular attention to type behavior, error handling, string and array offset access, ternary expressions, serialization, and extension availability. Build and test the production container or server image early, deploy through a staging environment with representative traffic and background jobs, and retain a tested rollback path while monitoring errors and performance after rollout.

We can tell you what moving off PHP 7.4 involves.

What it takes to move off PHP 7.4 depends on what you built on it — the version you are on, how much depends on it, and how much of the work is mechanical. Leave your email with this version and we can tell you what that looks like for you.

Not sure yet? Get my plan