About Privacy Terms

How to Check PHP Version Using Command Line | PHP

Home / PHP Introduction / How to Check PHP Version Using Command Line | PHP

Share Now

 

How to Check PHP Version Using Command Line | PHP

 


How to find PHP version on windows CMD using xampp:

  • In command prompt type:

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

for example if you are using XAMPP, the path will be C:\xampp\php

 

  • Then type php -v:

 

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

 

How to check the PHP version on Linux:

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

Image
VPS Hosting
Image
VPS Hosting
Image
Hosting Options
Image
VPS Hosting
Image
Shared Hosting
Image
Hosting Options
10 Best Windows Hosting Providers in 2023 | TOP 10

10 Best Windows Hosting Providers.