Guide · PHPUpdated October 9, 2026
PHP 8.2 to 8.4: migration, breaking changes and end-of-life dates
PHP 8.2 gets security fixes only until December 31, 2026. PHP 8.4 is supported until December 31, 2028. Going from 8.2 to 8.4 means two migration guides, so this page collects the supported dates and the breaking changes the PHP manual lists, quoted from it, in the order we check them.
Explore at your own pace
Open the section you need. The detail and sources are there when you want them.
01Supported PHP versions
From php.net, “Currently Supported Versions”, as shown on October 9, 2026.
| PHP | Initial release | Active support until | Security support until |
|---|---|---|---|
| 8.2 | December 8, 2022 | December 31, 2024 | December 31, 2026 |
| 8.3 | November 23, 2023 | December 31, 2025 | December 31, 2027 |
| 8.4 | November 21, 2024 | December 31, 2026 | December 31, 2028 |
| 8.5 | November 20, 2025 | December 31, 2027 | December 31, 2029 |
PHP 8.2 is already in its security-only phase. PHP 8.4 moves to security-only on December 31, 2026.
02From 8.2 to 8.3: backward incompatible changes
Quoted from the PHP manual. The manual lists more; these are the ones we check first.
- Negative array index
- “Assigning a negative index $n to an empty array will now make sure that the next index is $n+1 instead of 0.” PHP manual: Migrating from PHP 8.2.x to PHP 8.3.x, backward incompatible changes
- range()
- “A TypeError is now thrown when passing objects, resources, or arrays as the boundary inputs.” Also, range() now produces a list of characters if one boundary is a string digit. PHP manual: Migrating from PHP 8.2.x to PHP 8.3.x, backward incompatible changes
- Class constants
- “Class constant visibility variance is now correctly checked when inherited from interfaces.” PHP manual: Migrating from PHP 8.2.x to PHP 8.3.x, backward incompatible changes
- Opcache
- “The opcache.consistency_checks INI directive was removed.” PHP manual: Migrating from PHP 8.2.x to PHP 8.3.x, backward incompatible changes
- Execution timers
- “Zend Max Execution Timers is now enabled by default for ZTS builds on Linux.” PHP manual: Migrating from PHP 8.2.x to PHP 8.3.x, backward incompatible changes
03From 8.3 to 8.4: backward incompatible changes
Quoted from the PHP manual. Extension sections (DOM, MySQLi, PDO, SOAP, XML and others) have further items.
- E_STRICT
- “The E_STRICT error level has been removed, as it was no longer in use within the PHP engine.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
- Recursion in comparison
- “Encountering recursion during comparison now results in an Error exception instead of a E_ERROR fatal error.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
- GMP
- “The GMP class is now final and cannot be extended anymore.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
- Opcache JIT defaults
- “The default configuration values for the JIT changed from opcache.jit=tracing and opcache.jit_buffer_size=0 to opcache.jit=disable and opcache.jit_buffer_size=64M, respectively.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
- DOM and MySQLi removals
- “The DOMImplementation::getFeature() method has been removed.” “The MYSQLI_STMT_ATTR_PREFETCH_ROWS constant has been removed.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
- XMLReader
- “Passing an invalid character encoding to XMLReader::open() or XMLReader::XML() now throws a ValueError.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
04Deprecated in 8.4: fix before they are removed
Deprecations still run on 8.4 but print notices. Quoted from the PHP manual.
- Implicitly nullable parameters
- “A parameter’s type is implicitly widened to accept null if the default value for it is null.” This is deprecated; declare the type as nullable explicitly. PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, deprecated features
- trigger_error()
- “Calling trigger_error() with error_level being equal to E_USER_ERROR is now deprecated.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, deprecated features
- Class named _
- “Naming a class _ is now deprecated.” PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, deprecated features
- lcg_value()
- “lcg_value() is now deprecated, as the function is broken in multiple ways.” The manual points to Random\Randomizer::getFloat(). PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, deprecated features
- MySQLi
- mysqli_ping(), mysqli_kill() and mysqli_refresh() are deprecated. PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, deprecated features
05A safe order for 8.2 to 8.4
1. Run the tests on 8.3, then 8.4
Use one CI job per PHP version before you change a server. Treat deprecation notices as failures in CI.
2. Fix the implicit nullable parameters
This is the deprecation most codebases hit, because older code and older packages used the pattern widely.
3. Update packages that pin the PHP version
Check each package’s composer.json for a PHP constraint that excludes 8.4, and raise the framework if it requires it.
4. Check extension and INI use
Search for the removed Opcache directive, the DOM and MySQLi items above, and your JIT settings.
5. Deploy staging first
Move staging, watch the error tracker for new warnings, then production. Do it before December 31, 2026 so the production app is not on an unsupported branch.
06Questions about moving from PHP 8.2 to 8.4
When does PHP 8.2 reach end of life?
Its security support ends on December 31, 2026, according to php.net. Active support ended on December 31, 2024.
When does PHP 8.4 reach end of life?
Security support runs until December 31, 2028. Active support ends December 31, 2026.
Can I skip PHP 8.3 and go from 8.2 to 8.4?
Yes, but read both migration guides. The 8.3 and 8.4 backward incompatible changes both apply to your code.
Which PHP does Laravel 13 need?
PHP 8.3 or newer, according to the Laravel 13.x release notes.
07More deadlines
Next step
30 minutes with an engineer. Discuss your product, then get a free initial audit and a clear next step.
Sources
- PHP.net: Supported Versions
- PHP manual: Migrating from PHP 8.2.x to PHP 8.3.x, backward incompatible changes
- PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, backward incompatible changes
- PHP manual: Migrating from PHP 8.3.x to PHP 8.4.x, deprecated features
Checked October 9, 2026.