Type in the following in a file named say test.php and save it in document root of your webserver, normally htdocsfor apache:

<?php
// prints e.g. ’Current PHP version: 4.1.1′
echo ‘Current PHP version: ’ . phpversion();

// prints e.g. ’2.0′ or nothing if the extension isn’t enabled
echo phpversion(‘tidy’);
?>

Load the file in your browser. For example if you access your home page like:
http:/// 192.168.1.1/test.php
The output will be as follows

Current PHP version: 5.2.5

Post By Editor (2,827 Posts)

Website: →

Connect