In command prompt type below

set PATH=%PATH%;C:\path\to\php

Where C:\path\to\php is the folder where your php.exe file is located. After this run

C:\>php -v

than you will see something like

PHP 7.3.6 (cli) (built: May 29 2019 12:11:00) 

UPDATE:

If you find that when you restart your computer, this solution will not work anymore:

Set the Path like as following:

Step 1 - Click on the Windows icon

Step 2 - Click on the Settings icon

Step 3 - Click on System

Step 4 - Click on About

Step 5 - Click on System info

Step 6 - Click on Advanced system settings

Step 7 - Click on Environment variables...

Step 8 - Select Path row and then click Edit

Step 9 - Click New and then click Browse, then in the next panel which will open you need to select the folder you want in the Path. For the initial premise of this guide i will add the folder C:\Users\NewFolderInPath

Note: Replace your PHP installed path(e.g:C:\Program Files\php) with the above path .

Step 10 - Click OK and click every OK button you will encounter to close every previous windows.

Answer from NullPoiиteя on Stack Overflow

In command prompt type below

set PATH=%PATH%;C:\path\to\php

Where C:\path\to\php is the folder where your php.exe file is located. After this run

C:\>php -v

than you will see something like

PHP 7.3.6 (cli) (built: May 29 2019 12:11:00) 

UPDATE:

If you find that when you restart your computer, this solution will not work anymore:

Set the Path like as following:

Step 1 - Click on the Windows icon

Step 2 - Click on the Settings icon

Step 3 - Click on System

Step 4 - Click on About

Step 5 - Click on System info

Step 6 - Click on Advanced system settings

Step 7 - Click on Environment variables...

Step 8 - Select Path row and then click Edit

Step 9 - Click New and then click Browse, then in the next panel which will open you need to select the folder you want in the Path. For the initial premise of this guide i will add the folder C:\Users\NewFolderInPath

Note: Replace your PHP installed path(e.g:C:\Program Files\php) with the above path .

Step 10 - Click OK and click every OK button you will encounter to close every previous windows.

Answer from NullPoiиteя on Stack Overflow
Top answer
1 of 16
192

In command prompt type below

set PATH=%PATH%;C:\path\to\php

Where C:\path\to\php is the folder where your php.exe file is located. After this run

C:\>php -v

than you will see something like

PHP 7.3.6 (cli) (built: May 29 2019 12:11:00) 

UPDATE:

If you find that when you restart your computer, this solution will not work anymore:

Set the Path like as following:

Step 1 - Click on the Windows icon

Step 2 - Click on the Settings icon

Step 3 - Click on System

Step 4 - Click on About

Step 5 - Click on System info

Step 6 - Click on Advanced system settings

Step 7 - Click on Environment variables...

Step 8 - Select Path row and then click Edit

Step 9 - Click New and then click Browse, then in the next panel which will open you need to select the folder you want in the Path. For the initial premise of this guide i will add the folder C:\Users\NewFolderInPath

Note: Replace your PHP installed path(e.g:C:\Program Files\php) with the above path .

Step 10 - Click OK and click every OK button you will encounter to close every previous windows.

2 of 16
29

You just need to find out where is your PHP folder.

  • If you are using XAMPP or WAMP then you will see a php folder.
  • You just need to go into the php folder using your cmd using command

cd \xampp\php (FOR XAMPP)

cd \wamp\php (FOR WAMP)

  • And then just type in this command

php -v

  • Then you will see something like

PHP 5.6.11 (cli) (built: Jul 9 2015 20:55:40) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

🌐
PHP
php.net
PHP
The list of changes is recorded in the ChangeLog. ... The PHP development team announces the immediate availability of PHP 8.4.18. This is a bug fix release. All PHP 8.4 users are encouraged to upgrade to this version. For source downloads of PHP 8.4.18 please visit our downloads page, Windows source and binaries can also be found there.
Discussions

Updating PHP on Windows servers
I’ve just inherited some customer facing web servers and have been asked by the security team to update PHP on them, as they are “slightly” out of date. I’ve never had anything to do with PHP before, have no idea what it is, how it works or anything… and I am looking for some ... More on community.spiceworks.com
🌐 community.spiceworks.com
13
8
December 17, 2024
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
PHP on IIS Server 2019 - How do I update it?
I hope this is the right place to ask. We have used Web PI to install php 7.3 and that's all working fine. However the version from Web PI is 7.3.7. How do we update php to 7.3.31 which is the current release? Is it just a case of downloading… More on learn.microsoft.com
🌐 learn.microsoft.com
3
0
September 28, 2021
PHP version in Windows hosting - Web Hosting Technical Support Discussion Forum
How can I find out the PHP version in my Windows hosting environment? More on accuwebhosting.com
🌐 accuwebhosting.com
June 17, 2023
🌐
LinkedIn
linkedin.com › pulse › running-multiple-versions-php-windows-celine-bowen-fesff
Running Multiple versions of PHP on Windows.
June 12, 2024 - Ensure the path to PHP 7.4 is listed before the path to PHP 8.1 if you want PHP 7.4 to be the default version, vice versa is also true. ... Open a new command prompt and run PHP -v to check the current PHP version.
🌐
Wikihow
wikihow.com › computers and electronics › software › web programming › how to check php version: 3 ways on windows, mac, & linux
How to Check PHP Version: 3 Ways on Windows, Mac, & Linux
December 3, 2025 - To see which version of PHP is installed, open a command prompt or terminal, type "php -v", then press Enter or Return. If you can't access the command line, you can createa quick script or WordPress.
🌐
Gcore
gcore.com › home › developers › how to check the php version
How to check your PHP version via CLI or PHP File | Gcore
April 8, 2025 - A Detailed Guide Explaining How to Verify the PHP Version on Your Server, Utilizing Either the Command Line Interface or a PHP File.
🌐
PhoenixNAP
phoenixnap.com › home › kb › sysadmin › how to check php version
How to Check PHP Version | phoenixNAP KB
December 9, 2025 - 4. Click the New button and enter the path to your PHP installation path. Click OK in every window to save and apply the changes. 5. Open the Command Prompt again and check the PHP version:
Find elsewhere
Top answer
1 of 13
4

PHP is a scripting language that commonly has been used to implement a content management systems. It is my recommendation that you move anything that is dependent on PHP to a Linux machine. Microsoft ended their support and involvement of PHP about 5 years ago and at php 8.0. If you want to do like I do, utilize the tools on the system to manage the PHP installations (phpmanager and Windows Platform Installer) you can no longer do that. The infrastructure for both of those are gone (iis.net). Since PHP is an open source project, you can go directly there and get what you want, but you have also now acquired the resposibility for doing it yourself.
On top of that with the age of these servers, you have to also assess the applications that are using PHP. The upgrade from 5.6 to 8.2 isn’t likely to be smooth. Something built for 5.6 is far from being compatible with 8.x You have at least the step from version 5 to 7 and 7 to 8 to consider.

2 of 13
8

I’ve just inherited some customer facing web servers and have been asked by the security team to update PHP on them, as they are “slightly” out of date.

I’ve never had anything to do with PHP before, have no idea what it is, how it works or anything… and I am looking for some straightforward guidelines to updating it while ensuring that our customer sites are not affected in anyway…

Has anyone got any pointers?

They’re 2 x Windows Server 2012 R2 and 1 x 2016. The 2012R2s have PHP version 5.6.31 and the 2016 has version 7, and we use IIS.

🌐
Reddit
reddit.com › r/phphelp › how to check php version?
r/PHPhelp on Reddit: How to check PHP version?
November 4, 2023 -

hi, I'm new to PHP.

I want to change display_errors to On for debugging, but see many PHP versions installed.

I thought going to http://localhost/first/index.php?language=English&page=phpinfo would give me the version , but it just renders the regular index page.

Ty.

🌐
H2S Media
how2shout.com › home › php › how to know if php is installed on windows?
How to know if PHP is installed on Windows? - H2S Media
March 6, 2023 - After finding the folder, select it and press the OK button. Now, open the command prompt or PowerShell to run the common php -v command for showing the version-related details. Another way to check the version of PHP on Windows 11 or 10 is ...
Top answer
1 of 3
2

Hi @XR220 ,

I suggest you install php manager in IIS. It can help you manage different versions of php and it is simpler to add new php than configure fastcgi manually. Download it from here.

Please download php from this link and choose the zip:

Please put all php folders in C:\Program Files (x86)\PHP for ease of management. (Web PI also install php in this folder)

  1. Click php manager to register new php version.
  2. Choose the php-cgi.exe of php 7.3.31 and OK.
  3. Click Change php version to check which version of php is using now.
  4. Then click Check php info and OK, it will output the version of php.

If it doesn't output php version correctly and show error that fastcgi exited unexpectedly, you can use command line to run php-cgi.exe. It will tell you why php run failed. When I tested php 7.3.31, it ran failed because VCRUNTIME140.dll is missing. If you have same issue, please download it from here. Choose the x64 or x86 according to your machine.


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our  documentation  to enable e-mail notifications if you want to receive the related email notification for this thread.

Best regards,
Bruce Zhang

2 of 3
0

Hi there, Our intranet sites webserver is curretly using PHP version 7.4.21 and I'm trying to update it to 8.4.12.

I've installed the new version in the web server and saved it in the same PHP folder where the older version was installed.

After that I opened up IIS manager > webserver > Fast CGI settings and created a new fastcgi application with new php version folder path.

Expanded sites and clicked on one of the intranet site

Selected Handler mapping and updated the .php file with new path

Saved and restarted the webserver but the website gives error 505 with the new version. If I change the fastcgi application back to the older version the site works again.

Can someone please help me or let me know if I'm missing anything or suggest something? Thanks!

🌐
Host IT Smart
hostitsmart.com › manage › knowledgebase › 465 › check-php-version-in-windows-cmd.html
How to Check PHP Version in Windows CMD?
September 4, 2025 - In this detailed guide, we will walk you through the step-by-step process of checking the PHP version in Windows CMD (Command Prompt) in a beginner-friendly manner.
🌐
Cyfuture Cloud
cyfuture.cloud › kb › general › how-do-i-check-php-version-and-configuration
How Do I Check PHP Version And Configuration?
When making decisions concerning updates, installs, and settings, these factors would be crucial for anybody creating applications, managing systems, or just managing websites. This tutorial will walk you through the process of using the command line to find the PHP version and configuration.
🌐
Benjamin Crozat
benjamincrozat.com › home › blog › check php version: command line and browser methods
6 ways to check your version of PHP in 2025 - Benjamin Crozat
August 11, 2025 - To check your PHP version, run php -v in your terminal. The first line shows your current version immediately. If you cannot use the terminal, phpinfo(), phpversion(), and Laravel’s php artisan about command are the next easiest options.
🌐
Beyond GTA Inc.
beyondgta.com › post › the-impact-of-php-version-and-how-to-check-it
The Impact of PHP Version and How to Check it
May 21, 2024 - First, determine your environment. Linux: Open a terminal and run php -v from the relevant directory. Windows: Open Command Prompt or PowerShell and run php -v from the relevant directory.
🌐
AccuWeb
accuwebhosting.com › discussion › forum › peer-support › windows-hosting › 35906-php-version-in-windows-hosting
PHP version in Windows hosting - Web Hosting Technical Support Discussion Forum
June 17, 2023 - Type the following command and press Enter: php -v · The output will display the PHP version number, build date, and other relevant information. Using the Hosting Control Panel (e.g., Plesk): Log in to your hosting control panel, such as Plesk.
🌐
Scriptcase
forum.scriptcase.net › applications › installing scriptcase / install.php / .exe
How to know what php version I have installed ? - Installing ScriptCase / install.php / .exe - Scriptcase Low-code
October 29, 2013 - Hi Friends, If I simply update from version to version using the normal Sc update tool (Ej. from V7.09 to v7.10) this update process do not update the php 5.3 to php 5.4 too ? Thanks Aquiles
🌐
How To Check Version
howtocheckversion.com › check-php-version-running
How to check what PHP version I am running – How To Check Version
September 28, 2023 - php -v is also working on Windows platforms. You can just start your CMD and run it to see the PHP version you currently have installed.
🌐
sebhastian
sebhastian.com › check-php-version
How to check PHP version | sebhastian
July 20, 2022 - If you have access to the command line or terminal, then you can check your php version by running the php -v or php --version command. ... $ php -v PHP 8.1.5 (cli) (built: Apr 16 2022 00:03:58) (NTS) Copyright (c) The PHP Group Zend Engine ...