how to know php version in php code example Example: checking php version <?php echo 'PHP version: ' . phpversion(); ?>