get php version c# code example Example 1: php get version echo PHP_VERSION; Example 2: checking php version <?php echo 'PHP version: ' . phpversion(); ?>