Short answer: PHP 8.5 is the current PHP release (shipped November 20, 2025; latest patch 8.5.12). Highlights: the pipe operator (|>), array_first() / array_last(), stack traces on fatal errors, a max_memory_limit INI ceiling, and a new IntlListFormatter. It is a solid upgrade for most sites — but clearing deprecations alone does not make it safe, so read the removed-functionality and configuration notes below. (PHP 8.6 is expected around November 2026.)
New features worth knowing
- Pipe operator
|>— chain calls left-to-right instead of nesting. array_first()/array_last()— first/last element withoutreset()/end().- Stack traces for fatal errors — far faster production debugging.
max_memory_limit— a hard INI ceiling per-scriptmemory_limitcannot exceed.IntlListFormatter— locale-aware list formatting (“A, B, and C”).
Full list: PHP 8.5 new features.
What changes when you upgrade (three separate things)
These are not the same and each needs a different check — don’t treat “no deprecation notices” as “safe to upgrade.”
- Deprecations (still work, emit notices): non-canonical scalar casts
(integer)/(boolean)/(double),mysqli_execute(),socket_set_timeout(), theMHASH_*constants, and no-op calls likecurl_close(). - Removed functionality (hard breaks): the CLI
-z/--zend-extensionoption is gone, thedisable_classesINI directive is removed, and some long-deprecated APIs no longer exist. These fail rather than warn. See backward-incompatible changes. - Configuration/behaviour changes: for example how OPcache is loaded changed. Review your INI against the 8.5 migration guide.
Jumping from PHP 8.1 or 8.2? Read the migration guide for each version in between (8.2→8.3, 8.3→8.4, 8.4→8.5), not just the last hop — incompatible changes accumulate.
How to upgrade safely
- Check the version your site runs, not just the CLI.
php -vreports the command-line PHP, which is often different from the web handler. Confirm the web SAPI version, the loadedphp.iniand the enabled extensions (control panel or a temporaryphpinfo()page), and check cron/CLI separately. - Scan for deprecations in staging — set
error_reporting = E_ALL, exercise the app, and fix the notices above. - Handle removed functionality and config changes from the list above — these won’t show up as deprecation notices.
- Test frameworks and PECL extensions for 8.5 builds.
- Keep a tested rollback. Keeping the old PHP binary installed is not enough: back up application code, configuration and the database, confirm database/driver compatibility if it changes, and rehearse the restore before cutover.
Frequently asked questions
Is PHP 8.5 the latest version?
Yes — as of late 2026 PHP 8.5 is the current release (latest patch 8.5.12). PHP 8.6 is expected around November 2026 on the annual cycle.
Will upgrading to PHP 8.5 break my site?
It can. Clearing the deprecation notices is necessary but not sufficient: 8.5 also removes some functionality (for example the disable_classes INI directive) and changes behaviour such as how OPcache is loaded. Test on staging, and if you are coming from 8.1 or 8.2 read the migration guide for each version in between, not just 8.4 to 8.5.
Is PHP 8.2 end-of-life?
Not yet. PHP 8.2 receives security fixes through December 31, 2026. PHP 8.1 reached end of life at the end of 2025. Plan your move off 8.2 before the 2026 cutoff; PHP 8.3 is supported until December 31, 2027.
How do I check which PHP version my website actually uses?
php -v shows the command-line PHP, which can differ from the version your site runs. Check the handler your site uses (the web SAPI version, the loaded php.ini and the enabled extensions) in your control panel or a phpinfo() page, and test CLI scripts and cron jobs separately.
