public static function getLookupPrefixes()
{
$prefixes = array('/usr', '/usr/local', '/usr/local/opt', '/opt', '/opt/local');
if ($pathStr = getenv('PHPBREW_LOOKUP_PREFIX')) {
$paths = explode(':', $pathStr);
foreach ($paths as $path) {
$prefixes[] = $path;
}
}
// if there is lib path, insert it to the end.
foreach ($prefixes as $prefix) {
if ($arch = self::detectArch($prefix)) {
$prefixes[] = "{$prefix}/{$arch}";
}
}
return array_reverse($prefixes);
}