class PhpInterpreter

Wraps a PHP executable and its resolved version, extensions, and command-line options.

Methods

__construct(string $path, array $args = [])

No description

withArguments(array $args)

Returns a new instance with additional command-line arguments appended.

withPhpIniOption(string $name, string|null $value = null)

Returns a new instance with a -d INI option appended to the command line.

string
getCommandLine()

No description

array
getCommand()

No description

string
getVersion()

No description

array
getCodeCoverageEngines()

No description

bool
isCgi()

No description

string
getStartupError()

No description

string
getShortInfo()

No description

bool
hasExtension(string $name)

No description

Details

at line 27
__construct(string $path, array $args = [])

No description

Parameters

string $path
array $args

at line 81
PhpInterpreter withArguments(array $args)

Returns a new instance with additional command-line arguments appended.

Parameters

array $args

Return Value

PhpInterpreter

at line 92
PhpInterpreter withPhpIniOption(string $name, string|null $value = null)

Returns a new instance with a -d INI option appended to the command line.

Parameters

string $name
string|null $value

Return Value

PhpInterpreter

at line 98
string getCommandLine()

No description

Return Value

string

at line 105
array getCommand()

No description

Return Value

array

at line 111
string getVersion()

No description

Return Value

string

at line 118
array getCodeCoverageEngines()

No description

Return Value

array

at line 124
bool isCgi()

No description

Return Value

bool

at line 130
string getStartupError()

No description

Return Value

string

at line 136
string getShortInfo()

No description

Return Value

string

at line 143
bool hasExtension(string $name)

No description

Parameters

string $name

Return Value

bool