PHP version without phpinfo () or phpversion ()

0

Does anyone know how to check the php version without using return methods? I looked at php.ini and there also is not much useful. The closest I got was the version of php.exe and php-cgi.exe which is 5.2.7.7.

Can I trust the executable information or is this not the actual version that is installed?

Publication IIS (6 ¬¬) ... You know how to know there? Googlei but I did not find anything useful ...

    
asked by anonymous 01.07.2014 / 14:41

2 answers

1

By command line:

php.exe --version

But be careful: if you have more than one version of php on the machine, the command line executable can be one, and the one running in the webserver, from another.

    
01.07.2014 / 14:47
1

On my computer there are two versions of PHP, as I am WEB developer I test the versions mainly to visualize the performance.

The version that is configured in my IIS, I check with phpversion(); (which in question you do not want) in a PHP file like this:

<?php 
   phpversion();

Or by the plugin that I install, which is PHP Manager (although the corresponding version to use it is IIS 7 + ).

By command line, as @bfavaretto has already reported, I can check inside the respective folder which version is that PHP.

Both ways are reliable and give you the expected result.

    
01.07.2014 / 15:31