set PATH=%PATH%;C:\path\to\php
for example if you are using XAMPP, the path will be C:\xampp\php
C:\>set PATH=%PATH%;C:\xampp\php
C:\>php -v
[[output]] PHP 8.1.6 (cli) (built: May 11 2022 08:55:59) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies
You can use the command “php –version” or “php -v” to get the version of PHP installed on the system as following:
$ php -v
[[output]] PHP 8.1.6 (cli) (built: May 11 2022 08:55:59) (ZTS Visual C++ 2019 x64)
Copyright (c) The PHP Group
Zend Engine v4.1.6, Copyright (c) Zend Technologies
Share With Family & Friends
10 Best Windows Hosting Providers.