How to know what version of PHP is used on my xampp?

186,544

Solution 1

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

Solution 2

Try with command from terminal

sudo /opt/lampp/bin/php -v

Solution 3

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

Share:
186,544

Related videos on Youtube

Afghan Dev
Author by

Afghan Dev

Updated on September 18, 2022

Comments

  • Afghan Dev
    Afghan Dev over 1 year

    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?

  • 2707974
    2707974 about 10 years
    -v is better option
  • user10355
    user10355 about 10 years
    Ok friend I'll memorize that
  • AbraCadaver
    AbraCadaver about 10 years
    Hopefully short_open_tag is enabled, maybe <?php
  • Waqar
    Waqar over 7 years
    or search this file readme_en.txt to find version details
  • Ranjith Siji
    Ranjith Siji over 6 years
    the command is more good than creating this file.