If you don’t want to download latest version of php but you want to update php version so use simple command on your apache server.
How to Do
- Open terminal or SSH.
- Use given command for update and set php version.
sudo add-apt-repository ppa:ondrej/php sudo apt update
- Then restart your server using sudo systemctl restart apache2 command.
This command used on apache server, So use code and update and set latest version of php. Thanks for visiting.