PHP 7 is released, How can i install PHP7 in XAMPP. I am currently using PHP 5.5.30 and my Ubuntu version is 15.10 . Thanks


You can add a ppa with PHP7:

sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0
  • will it work with xamp ? – Dip Dec 4 '15 at 16:11
  • I don't know. Try it in a virtual machine. – mdd Dec 4 '15 at 16:14
  • 1
    nope, it will not work on xampp :) – Attila Naghi Feb 10 '18 at 17:26

In the new version lamp-server included php 7. just use the default installation

sudo apt-get install lamp-server


  • That command would give the following error message: E: Unable to locate package lamp-server. The easiest way to fix your command is sudo apt-get install tasksel && sudo tasksel install lamp-server. – karel Jul 17 '17 at 13:12

As far as I'm aware PHP7 isn't officially included in your version of Ubuntu (not sure about plans for the future) - so you will have to either find some unofficial packages or build your php7 installation yourself.

  • PHP7 is not officially included i know that. What i mean is to how to update php in xampp which i installed in ubuntu ! – Dip Dec 4 '15 at 15:56
  • You should check that then probably with xampp maintainers - if their installation provides PHP7. Otherwise my answer still stays valid - some unofficial debs or own installation/compilation. – Jacek Dec 4 '15 at 16:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.