Skip to content

Commit 46261ba

Browse files
committed
Use the current invoked version of PHP (#96)
1 parent 5830684 commit 46261ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Settings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,11 @@ public static function parseArguments(array $arguments)
145145
$arguments = new ArrayIterator(array_slice($arguments, 1));
146146
$settings = new self;
147147

148+
// Use the currently invoked php as the default if possible
149+
if (defined('PHP_BINARY')) {
150+
$settings->phpExecutable = PHP_BINARY;
151+
}
152+
148153
foreach ($arguments as $argument) {
149154
if ($argument{0} !== '-') {
150155
$settings->paths[] = $argument;

0 commit comments

Comments
 (0)