Article

Migrating from PHP 8.3 to PHP 8.4

PHP 8.4 upgrade guidance: exit()/die() behavior, E_STRICT removal, JIT defaults, and sharper ValueErrors.

PHP 8.4 is in active support until 2026-12-31 (verified 2026-08-09). Review migration84 incompatible changes before production promotion.

exit / die behave like functions

They participate in callable semantics and strict_types coercions. Invalid types throw TypeError. Code that passed arbitrary values into exit($mixed) needs review.

# LEGACY casual usage
exit($errorObject); // may coerce surprisingly

# MODERN
exit((string)$errorObject->getMessage());

E_STRICT removed

The E_STRICT error level is gone (constant deprecated). Clean monitoring configs that referenced it.

JIT defaults

Defaults moved to opcache.jit=disable with a non-zero buffer size setting. Enabling JIT via buffer size alone may not behave as on earlier 8.x—set opcache.jit explicitly if you rely on JIT.

Stricter parameter validation

Many extensions now throw ValueError/TypeError for invalid arguments (round modes, CSV separators, Intl locales, etc.). Treat new exceptions as programmer errors to fix, not merely log.

SimpleXML iterator fix

Implicit iterator resets during asXML()/casts inside foreach were corrected—loops that accidentally depended on rewinding should be retested.

Scanners: deprecated checker. Next: 8.4→8.5.

Related scanners: PHP Version Compatibility Checker · PHP Deprecated Checker.

Related reading