apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt -y install php8.0
// version 7.4.3 if you are starting new project download v8
// otherwise do not install learn js frameworks.
sudo apt install php libapache2-mod-php php-common php-mysql php-gmp php-curl php-intl php7.4-mbstring php-xmlrpc php-gd php-xml php-cli php-zip
sudo apt install php libapache2-mod-php
# restart it
sudo systemctl restart apache2
$ sudo apt install php libapache2-mod-php php-mysql
$ sudo apt install openssl composer php-net-smtp php-mysql php-gd php-xml php-mbstring php-intl php-zip php-json php-pear php-bz2 php-gmp php-imap php-imagick php-auth-sasl php-net-idna2 php-mail-mime php-net-ldap3 php-net-sieve -y
sudo apt-get install php libapache2-mod-php
sudo apt install php7.2-cli
sudo apt install hhvm
apt-get install php