To get the PHP version as well as the Apache version of the current host build, you will need the PHP function apache_get_version():
$ver = apache_get_version();
Sample output:
Apache/2.2.6 (Win32) PHP/5.2.5
Which returns a string containing the Apache version number (2.2.6) as well as that of PHP (5.2.5).
You can also get the PHP version by:
echo phpversion();
You should also read:
- Apache, PHP: Get Apache Enabled Modules in PHP Dynamically and Detect if a Apache Module is Installed
- PHP: Count Words in a String
- PHP: Return and Get the Last Letter / Character of a String
- PHP: Crontab Class to Add, Edit and Remove Cron Jobs
- PHP: True empty() function to check if a string is empty or zero in length


Facebook
Twitter
Google Plus