Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using xampp on my Ubuntu OS. And I need to know what version of PHP my xampp is using. How do I do that?

share|improve this question
up vote 9 down vote accepted

Put this in your root directory:


Save it as phpinfo.php and point your browser to it (this could be http://localhost/phpinfo.php)

  • More information (you can get much more information than just the version).
  • Example (random image):

Screenshot of phpinfo() output

share|improve this answer
Hopefully short_open_tag is enabled, maybe <?php – AbraCadaver Mar 18 '14 at 17:48

Try with command from terminal

sudo /opt/lampp/bin/php -v
share|improve this answer

first you have to need the version of your Xampp

xampp -v 


xampp --version

Then you can check the php version from xampp website

you can't know it from command line since it's bundled inside the Xampp

share|improve this answer
-v is better option – 2707974 Mar 18 '14 at 11:09
Ok friend I'll memorize that – user259474 Mar 18 '14 at 11:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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