If you are using new version of xampp.

Try http://localhost/dashboard/phpinfo.php

Answer from Prosenjeet Paul on Stack Overflow
๐ŸŒ
Zen-cart
zen-cart.com โ€บ showthread.php โ€บ 228568-XAMPP-and-Different-PHP-Versions
v157 XAMPP and Different PHP Versions
Your base install version (7.4.25 for me) will be under xampp\php). Go to php.net and download the Windows version of that PHP file. Make sure you get the regular zip file as I cannot vouch for the others. I was told that the "debug" version was not the correct one.
Discussions

Is there a way to upgrade version of PHP of my local XAMPP without destroying anything??
This is one of many reasons i recommend using VM (vagrant) or container (docker) development environments instead of wamp/xamp/etc. Each project can have its own self contained versions of libs, php itself, even OS More on reddit.com
๐ŸŒ r/PHPhelp
9
4
May 20, 2020
PHP Version confusion (OSX, XAMPP)
Have you tried phpinfo to get more information about your installation? Node is a JavaScript runtime, it has nothing to do with PHP. It sounds like the browser extension hosts the files (I'm not familiar with that extension), in that case maybe the extension has some settings related to the PHP version? This is the package for php7.3 in brew. I think you should be able to uninstall it (and it will probably show you which packages depend on it, and therefore show you why it was installed). (This might not be correct, I'm don't have too much experience with brew) Also, you definitely should be using 7.4+, since older version have already reached EOL. More on reddit.com
๐ŸŒ r/PHPhelp
3
4
March 8, 2022
How to check PHP version?
The URL given is one that works with the script they provide or expect you to write. There's no built-in "magic URL" to show that information with PHP. A HTML page of configuration information can be generated in PHP code using phpinfo() You may also want to pay attention to the top section of phpinfo() output that lists the ini files read, to make sure you're editing the right files. This same information is available on the command line through the following commands: php -i (full information similar to phpinfo()) php -m (enabled modules / extensions) php -v (version) php --ini (ini files read) See also php --help for more command-line options. Note that you can also set most ini settings at runtime in a script using ini_set() . In this specific case see also the error_reporting() function. More on reddit.com
๐ŸŒ r/PHPhelp
6
1
November 4, 2023
How to use multiple versions of php
As pointed out, use Docker . I can recommend Docker for PHP Developers by Paul Redmond . More on reddit.com
๐ŸŒ r/PHP
22
2
June 20, 2018
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ sysadmin โ€บ how to check php version
How to Check PHP Version | phoenixNAP KB
December 9, 2025 - For this tutorial, we used Display PHP Version, which shows the PHP version in the At a Glance section on the Dashboard: ... This article showed the common ways to check the PHP version on your server, local machine, or WordPress website.
๐ŸŒ
Medium
medium.com โ€บ @divyesh__chotaliya โ€บ effortlessly-switching-xampp-php-versions-on-windows-d76b8e5237e7
How to Easily Manage PHP Versions in XAMPP on Windows | by Divyesh Chotaliya | Medium
September 26, 2024 - If itโ€™s in use, rename it to include its version number. Install the new PHP version, which will be placed in the โ€œxamppโ€ folder. Verify each installation by checking the PHP version through the XAMPP Control Panel.
๐ŸŒ
Apache Friends
apachefriends.org โ€บ faq_windows.html
XAMPP FAQs for Windows
If not, the download is broken or the file has been changed. ... If a change in the "php.ini" has no effect, it's possible PHP is using a different one. You can verify this with phpinfo(). Go to the URI http://localhost/xampp/phpinfo.php and search for "Loaded Configuration File".
Find elsewhere
๐ŸŒ
Quora
quora.com โ€บ How-do-you-reduce-the-PHP-version-in-XAMPP
How to reduce the PHP version in XAMPP - Quora
Answer: Step 1 : download xampp version 7.1.32 from your browser. Step 2 : after download & extract it and you will see php and apache folder in it. Step 3 : Rename php and apache folder present in C:\xampp Step 4 : Copy php and apache folder ...
๐ŸŒ
DEV Community
dev.to โ€บ kansoldev โ€บ how-to-change-php-version-in-xampp-for-windows-4klb
How to change PHP version in XAMPP for Windows - DEV Community
October 26, 2023 - LoadFile "C:/xampp/php/php7ts.dll" LoadModule php7_module "C:/xampp/php/php7apache2_4.dll" ... NOTE - Search everywhere in the file for "php7_module" and change it to "php_module" as you might need to change it in some places. After you have done all this, save the changes and restart your server, go back to this url and confirm that your PHP version has changed.
๐ŸŒ
Danpros
danpros.com โ€บ post โ€บ how-to-upgrade-php-in-xampp
How to Upgrade PHP in XAMPP to PHP 8.4 - danpros.com
July 8, 2025 - Restart Apache from the XAMPP Control Panel. Check if Apache starts without errors. Open a PHP info page or run php -v in the command prompt to confirm the PHP version displays as 8.4.
๐ŸŒ
Mathew Parker
mathewparker.co.uk โ€บ home โ€บ running multiple php versions on xampp
Running multiple PHP versions on XAMPP - Mathew Parker
April 4, 2021 - The one thing you need to know at this stage is what version of XAMPP you have โ€“ 32-bit or 64-bit. Most modern systems will be running 64-bit. If you donโ€™t know, you need to run a simple PHP script, which will output all the info needed. In fact, itโ€™s a good idea to do this, so we can check ...
๐ŸŒ
Infosolutionsgoa
infosolutionsgoa.com โ€บ tutor โ€บ upgrading-php-mariadb-xampp.html
Upgrading PHP and MariaDB Versions in XAMPP | Step by Step Guide
For this tutorial I am going to use XAMPP Version 8.2.12 which contains PHP Version 8.2.12 and MariaDB version 10.4.32. In case you already have databases created, please back them first in the sql format using phpmyadmin. You can also check out the tutorials on database management.
๐ŸŒ
nixCraft
cyberciti.biz โ€บ nixcraft โ€บ howto โ€บ php โ€บ how to check php version
How to Check and Print PHP Version on Linux / Unix - nixCraft
April 9, 2024 - Open the terminal prompt and then type the following commands. Login to the remote server using the ssh command. For example: ssh user@linux-unix-server-ip ยท To check PHP version, run: php --version OR php-cgi --version
๐ŸŒ
Simplilearn
simplilearn.com โ€บ home โ€บ resources โ€บ software development โ€บ how to run a php file using xampp: a step by step guide
How to Run a PHP Using XAMPP | Simplilearn
July 31, 2025 - Check out the ways to run a PHP file using XAMPP. Explore what XAMPP is and how can it be installed on your system. Read on to know how to execute a PHP script!
๐ŸŒ
Neutron Dev
neutrondev.com โ€บ multiple-php-versions-in-xampp
Run Multiple PHP Versions in XAMPP - Neutron Dev
October 20, 2023 - To check the PHP version you have installed, open the command prompt and type in php -v. Mine is 7.4.4 because this is the default version that comes out of the box with my installed version of XAMPP.
๐ŸŒ
Reddit
reddit.com โ€บ r/phphelp โ€บ php version confusion (osx, xampp)
r/PHPhelp on Reddit: PHP Version confusion (OSX, XAMPP)
March 8, 2022 -

Currently working my way through some PHP tutorials and in VSCode and browser (Chrome with Live Server extension) I'm getting a syntax error when using 'fat arrow' shorthand for anonymous functions. Then I read the arrow shorthand was only introduced in PHP 7.4. What is confusing me is that a) I installed XAMPP with PHP 8.1, b) my system PHP ('php --version') is 7.4.2 but if I display the PHP version number in code in the browser it outputs 7.3.x. Also, if I open the XAMPP server and go to PHP Info it displays 8.1.4

I have PHP 7.3.x and 7.4.x installed (via homebrew) though I don't actually remember ever installing 7.3.x (maybe it got installed with Node?)

My question I suppose is how to I tell VSCode and Chrome to use a specific version of PHP? Or how do I remove 7.3.x and at least make 7.4.x the default?

๐ŸŒ
TemplateToaster Blog
blog.templatetoaster.com โ€บ templatetoaster blog โ€บ tutorials โ€บ how to update change php version in xampp
How to Update Change PHP Version in XAMPP - TemplateToaster Blog
September 5, 2023 - After the download you need to extract it, and you will find php and apache folder in it. Now rename the apache folder that you can find in C:\xampp. Restart the apache and MySQL. Now you can check the pho version by using the command โ€œphp-vโ€.