What are the potential issues when upgrading from PHP 7.4 to 8.0?

One potential issue when upgrading from PHP 7.4 to 8.0 is that some functions and features may have been deprecated or removed in the newer version. To solve this, you will need to update your codebase to use the recommended replacements for any deprecated functions or features.

// Before PHP 8.0
$oldArrayFunction = array_map(function($item) {
    return $item * 2;
}, $array);

// After PHP 8.0
$newArrayFunction = array_map(fn($item) => $item * 2, $array);