To change php versions can get tricky
- list the versions
- change the verison
- reset the php module
- maybe remove some packages
Yum erase php php-pear php-mysql php-cli php-common
- select new version
- install dependencies
- ensure php restarts on reboot
Refs:
https://www.linuxtechi.com/install-php-on-centos-8-rhel-8/
https://www.toolbox.com/tech/operating-systems/question/how-to-remove-php-from-centos-072312/