Easy copy and paste add repositor for Debian for additional PHP versions ( sury repo )
# apt-get install -y apt-transport-https lsb-release ca-certificates
# wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg >/dev/null 2>&1
# echo "deb https://packages.sury.org/php/ $(lsb_release -c -s) main" > /etc/apt/sources.list.d/php.list
apt-get update & apt-get upgrade -y
check if the php version ( base is correctly setted up )
- Debian 12 = 8.2
- Debian 11 = 7.4
- Debian 10 = 7.3
# update-alternatives --config php
# update-alternatives --config php-cgi
# update-alternatives --config php-fpm.sock