I want to display the PHP version on my page, and I have two PHP binaries on my server. One is used for the website (i.e. used by the content in /public_html/) and the other one is used by the command line.
Both the PHP have different version so I want to display the CLI PHP version using the web server. I have the path of both binaries.
I am using:
exec('/usr/bin/php-cli -r "echo phpversion();"', $phpversion, $ret);
echo $phpversion = implode('', $phpversion);
But it is giving me some ascii code which is not recognized by my browser.
The out put I get is �2�3�34��V.B
What's going wrong?