You are comparing the version of the php command line executable php with the version of the php module that is loaded in the web server. These two may belong to different php versions.
Check the version of the php module that is loaded by the web server.
Assuming you run apache webserver, the output of
grep -r php /etc/httpd | grep LoadModule
shows you the php module loaded by Apache httpd.
The command:
rpm -q - f /etc/httpd/modules/name_of_php_module.so
will show you the rpm package version for the php module and the command
rpm -q - f $(which php)
will show you the rpm package version for the php command client program.
Thanks. That helped some. I’m running Nginx and didn’t update php-fpm. But now that I’ve done that I can’t login to my Nextcloud instance. I enter credentials and it just reloads the login page. Haven’t checked logs yet, but, going there next.