How to install multiple PHP versions in Linux Ubuntu 20.04 and switch between them in both cli and apache web server.
#php #apache #multiplephp #ubuntu20
commands used
to check php version
php -v
to list out all available php version
sudo update-alternatives --config php
to enable php version mode in apache with version number
sudo a2enmod php7.4
to disable php version mode in apache with version number
sudo a2dismod php7.4
to restart apache
sudo service apache2 restart