command to know the php version code example
Example 1: checking php version
<?php
echo 'PHP version: ' . phpversion();
?>
Example 2: check php version linux terminal
/* in terminal type it*/
php -v
<?php
echo 'PHP version: ' . phpversion();
?>
/* in terminal type it*/
php -v