PHP 8.3 on Rocky Linux 9

Follow notes at linuxcapable.com

dnf config-manager --set-enabled crb
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm 
NOTE: You may not want the following: dnf install https://dl.fedoraproject.org/pub/epel/epel-next-release-latest-9.noarch.rpm
dnf install dnf-utils http://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf module list php
dnf module reset php
dnf module enable php:remi-8.3
dnf install php php-cli php-mysqlnd php-opcache php-pdo php-pecl-mcrypt php-sodium

Run php -v to verify correct version is installed.

After the install, these PHP packages should be on the system:

oniguruma5php-6.9.9-1.el9.remi.x86_64
php-8.3.2-1.el9.remi.x86_64
php-cli-8.3.2-1.el9.remi.x86_64
php-common-8.3.2-1.el9.remi.x86_64
php-fpm-8.3.2-1.el9.remi.x86_64
php-mbstring-8.3.2-1.el9.remi.x86_64
php-mysqlnd-8.3.2-1.el9.remi.x86_64
php-opcache-8.3.2-1.el9.remi.x86_64
php-pdo-8.3.2-1.el9.remi.x86_64
php-pecl-mcrypt-1.0.7-1.el9.remi.8.3.x86_64
php-sodium-8.3.2-1.el9.remi.x86_64
php-xml-8.3.2-1.el9.remi.x86_64

These packages may be extras and not needed:

gd3php
php-gd
php-intl
php-pecl-zip
php-process

If you want to go back down a version, follow the steps above to reset/list/enable the version you want. Then rpm -qa |grep php to find the packages that need to be downgraded to the previous version. Remove all those RPMs. Then do the dnf install php packages command to get the version you desire.