check whether php is installed or not code example
Example 1: check the php version in ubuntu
php --version
Example 2: test if php is installed
Create a php file containing code <? php echo phpinfo(); ?> and save it as test.php.
then you have installed PHP properly.