Check PHP Version Print

  • Check PHP Version, How to find Installed Components of web Server
  • 0

Checking PHP version with phpinfo()

The most reliable way of finding out what version of PHP is used for that specific website is to use the phpinfo() function, which prints various information about the PHP server, including its version.

In your website document root directory upload the following PHP file using a FTP or SFTP client:

 

phpinfo.php
<?php
phpinfo();

Open your browser, go to yourdoman.com/phpinfo.php ,and the version of the PHP server will be displayed on your screen


Checking PHP version from the Command Line

If you have SSH access to the server, you can use the PHP CLI binary to determine the version of your PHP.

To get the server version, invoke the php binary using the --version or -v option:

php --version

Was this answer helpful?

« Back