Because PHP 8 is a major new release, one should expect old code to no longer be compatible. However, most of the changes that could lead to complications were already addressed in versions 7.2, 7.3, and 7.4.
The latest changes include:
- The real type
- Magic quotes legacy
- array_key_exists() with objects
- FILTER_SANITIZE_MAGIC_QUOTES filter
- Reflection export() methods
- mb_strrpos() with encoding as 3rd argument
- implode() parameter order mix
- Unbinding $this from non-static closures
- hebrevc() function
- convert_cyr_string() function
- money_format() function
- ezmlm_hash() function
- restore_include_path() function
- allow_url_include ini directive
If you have always kept your code up to date, you won’t have any problems migrating to PHP 8, even if the new update is a major release without backward compatible changes. A complete list of changes can be found on the PHP project site.