GUIDE · PHP
PHP 8.3 end of life: what to do before 31 December 2027
PHP 8.3 still gets security fixes, but only until the end of 2027. You have time, and if your PHP comes from Ubuntu 24.04 you may have more. Here is how to check, which version to aim for and what to fix on the way.
GuidesPublished 25 November 2026
What has changed, and what changes on 1 January 2028
PHP 8.3's active support ended on 31 December 2025. Since then the PHP project fixes security issues only, in releases made as needed, and ordinary bugs stay as they are (php.net).
Those security fixes still matter. On 21 October 2026 the PHP project fixed two critical flaws that let an attacker run code on the server without logging in, on any PHP installation that serves web requests. PHP 8.3.36 was one of the fixed releases (php.net). The latest, 8.3.37, came out on 19 November 2026 (php.net).
On 1 January 2028 that stream stops. PHP 8.3 keeps running exactly as before, but a flaw like October's found after that date will not be fixed by the PHP project. Security scanners and insurance questionnaires flag unsupported versions too, so it will start showing up in audits.
Where does your PHP 8.3 come from?
This decides your real deadline. Four commands tell you most of it: the version, where the package comes from, the Dockerfiles that use an 8.3 image, and what in your Composer project blocks a newer PHP.
php -v
apt-cache policy php8.3-cli
grep -rn "php:8.3" --include="Dockerfile*" .
composer why-not php 8.5- Ubuntu 24.04's own packages: Ubuntu 24.04 ships PHP 8.3 in its main repository (Ubuntu packages), so Canonical patches it during the release's standard support, until May 2029, and until May 2034 with Ubuntu Pro (Ubuntu). For the October flaws, Ubuntu published its fixed package on 21 October 2026 (Ubuntu). It is also the PHP you get when you upgrade from Ubuntu 22.04 (our Ubuntu 22.04 guide).
- Debian: no Debian release ships PHP 8.3. Debian 12 has PHP 8.2 and Debian 13 has PHP 8.4 (Debian 12, Debian 13). If you run 8.3 on Debian, it came from a third-party repository, so it follows the PHP project's date.
- A Docker image such as php:8.3-fpm: the official image has 8.3.37 tags on Debian and Alpine bases (Docker official images) and follows the PHP project's date. Pin the version in production: php:latest now points to PHP 8.6.0.
- A third-party repository or PHP built by hand: you follow the PHP project's date, 31 December 2027, and the upgrade is yours to do.
- A hosting panel or shared hosting: your host decides. Being in the menu does not mean being patched: Plesk, for example, still offers PHP versions as old as 5.2 next to current ones (Plesk). Check your host's notice.
One trap on Ubuntu: php -v shows 8.3.6 there, while the PHP project is at 8.3.37. Ubuntu copies security fixes into its own 8.3.6 package instead of moving to new releases. The fix for the October flaws, for example, is package version 8.3.6-0ubuntu0.24.04.13 (Ubuntu). A scanner that only reads php -v will report flaws that are already fixed, so check the package version that apt-cache policy shows.
Which version to move to
| Version | Security fixes until | When to choose it |
|---|---|---|
| PHP 8.3 | 31 Dec 2027 (May 2029 for Ubuntu 24.04's own package) | Fine for now. Stay on the latest release and plan the move. |
| PHP 8.4 | 31 Dec 2028 | When a plugin or package is not ready for 8.5. Its bug fixes end on 31 December 2026. |
| PHP 8.5 | 31 Dec 2029 | The usual target today: supported by Laravel 12 and 13, Symfony 7.4 and WordPress 6.9 and later. |
| PHP 8.6 | 31 Dec 2030 | Released on 19 November 2026. Wait until your framework and plugins list it. |
Dates from php.net. Each version gets two years of bug fixes, then two more years of security fixes only.
If you prefer your distribution's packages: Ubuntu 26.04 ships PHP 8.5 (Ubuntu) and Debian 13 ships PHP 8.4 (Debian). Our Debian 12 guide covers that upgrade.
Check your framework first
- Laravel: Laravel 13 runs on PHP 8.3 to 8.5 and gets security fixes until 17 March 2028. Laravel 12 also runs on 8.2 to 8.5, but its security fixes end on 24 February 2027, earlier than PHP 8.3 itself (Laravel). Our Laravel 12 guide covers that move.
- Symfony: Symfony 7.4 LTS runs on PHP 8.2 and newer, with security fixes until November 2029. Symfony 8 needs PHP 8.4. Symfony 6.4 LTS gets security fixes until November 2027 (Symfony).
- WordPress: WordPress 6.9 and later are marked compatible with PHP 8.3, 8.4 and 8.5, and PHP 8.6 is not in the table yet (compatibility table). WordPress recommends PHP 8.3 or newer (WordPress). Plugins and themes are the usual blockers: check each one's changelog.
- Composer: if composer.json sets config.platform.php, Composer resolves packages for that version whatever PHP the server runs (Composer). Raise it in the same change as the switch. composer why-not php 8.5 lists the packages that block the new version (Composer).
What breaks from 8.3 to 8.4
From the PHP manual's incompatible changes, deprecations and removed extensions for 8.4. A deprecation does not break anything yet: the code still runs and PHP writes a notice to the log. The ones that most often touch a web app:
- Implicitly nullable parameters are deprecated. A typed parameter with a default of null must now say it accepts null. Our PHP 8.2 guide shows the fix.
- IMAP, OCI8, PDO_OCI and PSpell left PHP and now come from PECL. Apps that read mailboxes or talk to Oracle need them installed separately.
- E_STRICT is gone, and its constant is deprecated. Remove it from error_reporting settings.
- exit() and die() now throw a TypeError when given an invalid type, such as an array.
- trigger_error() with E_USER_ERROR is deprecated. Throw an exception or call exit() instead.
- Session settings: changing session.sid_length, session.sid_bits_per_character or session.use_only_cookies is deprecated.
- CSV functions: fputcsv(), fgetcsv() and str_getcsv() without an explicit escape argument are deprecated.
- MySQL timeouts: on MySQL 8.0.24 and newer, the error code for a server wait timeout changed from 2006 to 4031. Long-running workers that reconnect on 2006 need updating.
- OPcache JIT is off by default. If you turned it on through opcache.jit_buffer_size alone, set opcache.jit explicitly.
What breaks from 8.4 to 8.5
From the PHP manual's deprecations and incompatible changes for 8.5:
- PDO driver constants moved. PDO::MYSQL_ATTR_SSL_CA and its siblings are deprecated in favour of Pdo\Mysql::ATTR_SSL_CA and the like, with the same for PostgreSQL and SQLite. They often sit in database configuration files.
- Old cast names are deprecated: (boolean), (integer), (double) and (binary). Use (bool), (int), (float) and (string).
- null as an array key is deprecated, including in array_key_exists(). Use an empty string.
- The backtick operator is deprecated. Use shell_exec() instead.
- Close functions are deprecated because they do nothing now: curl_close(), imagedestroy(), finfo_close() and xml_parser_free().
- OPcache is always built in. A zend_extension=opcache.so line in php.ini, common in Dockerfiles, now emits a warning.
- New warnings: destructuring a value that is not an array, and casting a float too large for an integer, now warn.
- The disable_classes setting is removed.
If you go on to PHP 8.6 later
Its release notes list a few changes to test for: sessions are stricter by default (strict mode and HttpOnly cookies on, SameSite set to Lax), trim() also strips form feeds, and many functions now throw a ValueError for invalid arguments instead of quietly carrying on.
Upgrade steps
- List every place PHP runs and every place its version is set: servers, Dockerfile FROM lines, CI configuration, the php constraint and config.platform.php in composer.json, and your host's or panel's settings.
- Update the framework and packages first, still on PHP 8.3, so you change one thing at a time. A Laravel 12 app moves to Laravel 13 here.
- Install the new PHP next to the old one, with the same extensions: php -m lists them. Check for IMAP, OCI8 and PSpell, which now come from PECL.
- Run the tests and the app on staging with error_reporting set to E_ALL, and read the deprecation notices in the logs.
- Fix what they report, starting with errors and the removed extensions, then the deprecations.
- Switch production in a quiet window and keep PHP 8.3 installed, so switching back takes a minute. Pin the Docker image to the new version.
- Watch the error logs for a few days, then remove the old version.
If you cannot upgrade in time
You have until 31 December 2027, so the first step is a plan, not a rush. Until then, install each new 8.3 release, or your distribution's updated package, as it comes out.
If your PHP is Ubuntu 24.04's own package, the release decides your deadline: May 2029, or May 2034 with Ubuntu Pro. Your framework can still move you sooner, as Laravel 12 does.
Everywhere else, write down the date you will upgrade, reduce what is exposed (admin pages behind a VPN or an IP allowlist, unused plugins removed) and keep everything else patched. Commercial extended support for old PHP versions exists, but it buys time, not a solution.
Questions
Will my site stop working on 1 January 2028?
No. PHP 8.3 keeps running. It just stops receiving security fixes from the PHP project.
My Ubuntu 24.04 server says PHP 8.3.6. Is it out of date?
Not necessarily. Ubuntu copies security fixes into its own 8.3.6 package, so check the package version with apt-cache policy php8.3-cli and make sure the server installs its updates.
Should I go straight to PHP 8.6?
Not yet for most apps. It came out on 19 November 2026, Laravel 13 lists PHP 8.3 to 8.5, and WordPress's compatibility table does not list 8.6 yet. PHP 8.5 is supported until the end of 2029.
What about PHP 8.2?
Its security fixes end on 31 December 2026, a year before 8.3, so move it first. Our PHP 8.2 guide covers it.
Can PatchTempo do the upgrade?
Yes. It is part of the one-off hardening upgrade: tried on a copy first, rolled out after your approval, with the previous version ready to switch back to. Start with the free audit.
Sources
- PHP supported versions
- PHP news 2026: security releases and advisories
- PHP security advisory, 21 October 2026
- PHP 8.4 backward incompatible changes
- PHP 8.4 deprecations
- PHP 8.4 removed extensions
- PHP 8.5 deprecations
- PHP 8.5 backward incompatible changes
- PHP 8.6 release announcement
- php8.3 package in Ubuntu 24.04
- Ubuntu: CVE-2026-109618
- Ubuntu release cycle
- Debian bookworm php package
- Debian trixie php package
- PHP official Docker image tags
- Plesk Obsidian software requirements
- Laravel release notes
- Symfony releases
- PHP compatibility and WordPress versions
- WordPress requirements
- Composer config: platform
- Composer command line: prohibits and why-not