Skip to content

Commit 3b79208

Browse files
author
Willem Stuursma
committed
Move PHP_BINARY from array to code so that it won't get lost
1 parent 532de94 commit 3b79208

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Config.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class Config
179179
*
180180
* @var array<string, string>
181181
*/
182-
private static $executablePaths = ["php" => PHP_BINARY];
182+
private static $executablePaths = [];
183183

184184

185185
/**
@@ -1516,6 +1516,13 @@ public static function getExecutablePath($name)
15161516
return $data;
15171517
}
15181518

1519+
if ($name === "php") {
1520+
/*
1521+
* For php, we know the executable path. There's no need to look it up.
1522+
*/
1523+
return PHP_BINARY;
1524+
}
1525+
15191526
if (array_key_exists($name, self::$executablePaths) === true) {
15201527
return self::$executablePaths[$name];
15211528
}

0 commit comments

Comments
 (0)