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
- Composer Modernization Center Add Composer to legacy PHP projects, migrate includes to autoloading, set platform constraints, and replace a…
- PHP 5 to Modern PHP: Complete Incremental Migration Guide A deep, production-minded path from PHP 5.x codebases to supported PHP 8.x: removed extensions, charset, PDO,…
- PHP Security Modernization for Legacy Applications Upgrade inherited PHP security practices: prepared statements, password hashing, sessions, CSRF, XSS escaping…
- PHP 7 to PHP 8 Migration Guide Deep guide to PHP 8.0 breaking changes that matter for PHP 7 applications, with upgrade tactics through suppo…
- Inheriting a Legacy PHP Application A first-30-days playbook for developers handed an unfamiliar PHP codebase: runtime truth, risk triage, and sa…