How To Check PHP Version In CMD?

If there is a way to see the version of PHP software I have installed? How to check the PHP version on my computer?

Solution

You can check the PHP version on your computer. To do so, you have to go to the directory where the PHP has been installed.

Like in XAMPP software, we have htdocs where you can see the PHP folder.

So, the command is php -v and you should put it in htdocs dir through CMD like below:

C:\xampp\htdocs\php -v
Check php version in cmd

As you see in the above image, the result is the same.

You can see the PHP version using the command in your project directory or just go to htdocs and place the command.

Related Posts