System::type()

System::type() -- command for getting the full path of a program in the PATH

Description

mixed type (string $args)

This command is taken from the internal bash one. It is equivalent to the "which" Unix command in some systems.

Parameter

Returns

type man page

Example

// On Unix systems "grep" will be searched and in
// Windows systems "grep.exe" instead
$path = System::type("grep");
// $path could contain something like "/usr/bin/grep"