- PHP

How to check PHP version in XAMPPP

The easiest way to check PHP version in XAMPP is to make a new file inside htdocs directory.

Let’s call it check_version.php.

We will use the phpversion() function.

Place the following content inside the file:

<?php echo '<b>PHP version:</b> ' . phpversion(); ?>

Now open the localhost/check_version.php page in your browser and check the PHP version installed on your server.

Here is mine:

Output: PHP version: 7.4.27

If you need to, here is how to change the PHP version in XAMPP.