How to Get the PHP Version

PHP function to get the PHP version installed:

echo "Current PHP version: " . phpversion();

PHP: phpversion – Manual

Get PHP version from command-line on Linux:

php --version

Get PHP version from command-line on Windows:

C:\> "C:\Program Files\PHP\php.exe" -v

PHP function to get ALL PHP information:

phpinfo();

More Related Posts