diff --git a/src/lint/linter/ArcanistPhpLinter.php b/src/lint/linter/ArcanistPhpLinter.php index 5a0e4dc5..789e2e8d 100644 --- a/src/lint/linter/ArcanistPhpLinter.php +++ b/src/lint/linter/ArcanistPhpLinter.php @@ -39,15 +39,11 @@ final class ArcanistPhpLinter extends ArcanistExternalLinter { } public function getVersion() { - list($stdout) = execx('%C --version', $this->getExecutableCommand()); - - $matches = array(); - $regex = '/^PHP (?P\d+\.\d+\.\d+)\b/'; - if (preg_match($regex, $stdout, $matches)) { - return $matches['version']; - } else { - return false; - } + list($stdout) = execx( + '%C --run %s', + $this->getExecutableCommand(), + 'echo phpversion();'); + return $stdout; } public function shouldExpectCommandErrors() {