Which for PHP

Which

Interfaces, Classes, Traits and Enums

Finder
Finds the instances of an executable in the system path.
ResultSet
Provides convenient access to the stream of search results.
WhichCommand
The `which` command.

Table of Contents

which()  : ResultSet
Finds the instances of the specified command in the system path.

Functions

which()

Finds the instances of the specified command in the system path.

which(string $command[, array<string|int, string> $paths = [] ][, array<string|int, string> $extensions = [] ]) : ResultSet
Parameters
$command : string

The command to be resolved.

$paths : array<string|int, string> = []

The system path. Defaults to the PATH environment variable.

$extensions : array<string|int, string> = []

The executable file extensions. Defaults to the PATHEXT environment variable.

Return values
ResultSet

The search results.

Search results