How can one check if php-cli is installed on a Debian 7 vServer?

To check if php-cli is installed on a Debian 7 vServer, you can simply run the command "php -v" in the terminal. If php-cli is installed, it will display the PHP version information. If php-cli is not installed, you can install it using the package manager apt-get.

<?php
$output = shell_exec('php -v');
echo $output;
?>