How do I install PHP 7 (PHP next generation) on Ubuntu?
I wanted to install PHP 7 on a clean install of Ubuntu to see what issues I would face.
Here’s the of
Ondřej Surý has a PPA at https://launchpad.net/~ondrej/+archive/ubuntu/php
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
Using the PPA is certainly easier than building from source!
A note for people with PHP 5.x already installed; apt-get complained a bit when I tried to install install php7.0 on a box with PHP 5 on it, but after I did apt-get remove php5 to get rid of my existing PHP 5.6 install and then explicitly did sudo apt-get install php7.0-common I was able to get the sudo apt-get install php7.0 to go through. Don't know why this was necessary; if somebody who understands Apt better than I do would like to edit in some better instructions (or provide a better answer altogether and ask me to delete this one) then feel free.