How to check what PHP version running on Linux?

It’s very simple to check PHP version

1. PHP Info

You can use the following to yield PHP version number via Command Line

php -i

or

You can create a php file contain the following, upload it to your website

phpinfo();

Note: if your sys admin disabled phpinfo, you cannot check what PHP version with phpinfo()
2. Short Info in SSH

 

You can use the following to yield PHP version number via Command Line

php -v

or

php -i | grep 'PHP Version'
%d bloggers like this: