The detection relied on the output of the command php -v, which has different outputs for
PHP and HHVM: PHP 5.6.28-1+deb.sury.org~xenial+1 (cli) vs. HipHop VM 3.13.1 (rel).
The detection, which just splits this string, will fail for HHVM even though it is compatible to
PHP 5.6 or PHP 7.
This change updates the detection to the ouput of echo '(' . php_sapi_name() . ') ' . PHP_VERSION;,
which results in a better comparable output:
The detection relied on the output of the command php -v, which has different outputs for PHP and HHVM:
PHP 5.6.28-1+deb.sury.org~xenial+1 (cli)
vs.HipHop VM 3.13.1 (rel)
. The detection, which just splits this string, will fail for HHVM even though it is compatible to PHP 5.6 or PHP 7.This change updates the detection to the ouput of
echo '(' . php_sapi_name() . ') ' . PHP_VERSION;
, which results in a better comparable output:PHP:
(cli) 5.6.28-1+deb.sury.org~xenial+1
HHVM:(cli) 5.6.99-hhvm
With those strings, version and CLI detection works the same and covers also HHVM setups.