Find PHP version on windows command line

0 votes
I wanted to know the version of my PHP by using the windows command, C:\> php -v But it didn't work. It returned - "PHP is not recognized as internal or external command".

Can someone help me with this?
Jun 14, 2022 in PHP by narikkadan
• 63,600 points
1,016 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Type this in the command prompt:

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

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

C:\>php -v

It will display:

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

I hope this helps you.

answered Jun 16, 2022 by Kithuzzz
• 38,000 points

edited Mar 5

Related Questions In PHP

0 votes
1 answer

How to find the php.ini file from the command line?

Hello @kartik, You can get a full phpinfo() using : php ...READ MORE

answered May 19, 2020 in PHP by Niroj
• 82,840 points
54,922 views
0 votes
1 answer

How To Run PHP From Windows Command Line in WAMPServer

Hello @kartik, Try using batch file Open notepad type php -S ...READ MORE

answered Oct 27, 2020 in PHP by Niroj
• 82,840 points
3,256 views
0 votes
1 answer

Invalid argument supplied for foreach() on line 25. Error in my php and mysql

Hello @viven , This should be a simple fix ...READ MORE

answered Aug 4, 2020 in PHP by Niroj
• 82,840 points
4,488 views
0 votes
1 answer
0 votes
1 answer

Error:Undefined index: barangay in C:\xampp\htdocs\TextBlast\homepage\insert.php on line 22

Hello @ Regina, First checks whether a variable is ...READ MORE

answered Aug 14, 2020 in PHP by Niroj
• 82,840 points
6,017 views
0 votes
1 answer

How can I access the MySQL command line with XAMPP for Windows?

Hello @kartik, Your MySQL binaries should be somewhere ...READ MORE

answered Aug 20, 2020 in PHP by Niroj
• 82,840 points
22,910 views
0 votes
1 answer

'composer' is not recognized as an internal or external command in windows server

For anyone coming here from Google who ...READ MORE

answered Feb 17, 2022 in Others by Aditya
• 7,680 points
21,531 views
0 votes
0 answers

Need XAMPP with PHP 5.4 version - windows

Can someone please share with me any ...READ MORE

Jun 21, 2022 in PHP by narikkadan
• 63,600 points
1,079 views
0 votes
0 answers

Create PDF file using PHP

I want to create a PDF file ...READ MORE

Jun 24, 2022 in PHP by narikkadan
• 63,600 points
495 views
0 votes
0 answers

Php artisan make:auth command is not defined

I ran this command in Laravel 5.2 but ...READ MORE

Jul 21, 2022 in PHP by narikkadan
• 63,600 points
1,612 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP