in lib/php/libsdk/SDK/Build/PGO/Abstracts/PHP.php [96:118]
public function getVersion(bool $short = false) : string
{
$ret = NULL;
$cli = new CLI($this->conf, $this->scenario);
$out = shell_exec($cli->getExeFilename() . " -n -v");
if ($short) {
if (preg_match(",PHP (\d+\.\d+),", $out, $m)) {
$ret = $m[1];
}
} else {
if (preg_match(",PHP ([^ ]+),", $out, $m)) {
$ret = $m[1];
}
}
if (NULL === $ret) {
throw new Exception("Failed to determine the test PHP version.");
}
return $ret;
}