One command that asks you for the php version you want to use at phpmyadmin / snappymail.
Default PHP version is 7.3.
sh <(curl https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmod.sh || wget -O - https://raw.githubusercontent.com/tbaldur/cyberpanel-mods/main/phpmod.sh)