18

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?

3 Answers 3

21

Put this in your root directory:

<?php
phpinfo();
?>

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

2
  • 1
    Hopefully short_open_tag is enabled, maybe <?php Mar 18, 2014 at 17:48
  • the command is more good than creating this file. Jan 1, 2018 at 6:04
7

Try with command from terminal

sudo /opt/lampp/bin/php -v
5

first you have to need the version of your Xampp

xampp -v 

or

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

3
  • -v is better option
    – 2707974
    Mar 18, 2014 at 11:09
  • Ok friend I'll memorize that
    – user259474
    Mar 18, 2014 at 11:10
  • or search this file readme_en.txt to find version details
    – Waqar
    Oct 4, 2016 at 5:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .