By far the best way to see what version of PHP your server is running is to use the phpinfo() command.
Web designers/developers normally add a file to the root of their website called ‘phpinfo.php’ that contains the following:
Now when you navigate to your website root, e.g. https://mywebsite.com/phpinfo.php you will see a huge amount of PHP information including the specific version information right at the top, e.g.:
PHP Version 7.1.8
Please note paranoid security experts consider having this file a security risk, so please remember to delete it when you are done, or obfuscate the name of the file.