Name : php
Version : 8.2.14-1
Description : A general-purpose scripting language that is especially suited to web development
Architecture : x86_64
URL : https://www.php.net/
Licenses : PHP
Groups : None
Provides : php-interpreter=8.2 php-intl=8.2.14
Depends On : libxml2 curl libzip pcre2 argon2 oniguruma
Optional Deps : None
Required By : php-apache php-gd
Optional For : None
Conflicts With : php-intl
Replaces : php-intl
Installed Size : 26.82 MiB
Packager : Pierre Schmitz <pierre@archlinux.org>
Build Date : Thu Dec 21 15:02:51 2023
Install Date : Sat Dec 23 20:53:52 2023
Install Reason : Explicitly installed
Install Script : No
Validated By : Signature
And the error mentions PHP 7 while you have installed PHP 8:
So somewhere there’s a version mismatch. Reinstall PHP. but the latest version, while you’re at it, and reconfigure Apache to use that and not try to use version 7’s.