How do I figure out what version of PHP I am running?

The function

$version=phpversion();
will tell you the version of PHP your running this version of PHP is 5.2.17

Here is a copy of that the PHP program that tells you the version

<?php
$version=phpversion();
echo "this version of PHP is <b>$version</b>";
?>