Composer API
Class

Composer\Util\Platform

class Platform

Platform helper for uniform platform-specific tests.

Methods

static string expandPath(string $path)

Parses tildes and environment variables in paths.

static string getUserDirectory()

static bool isWindows()

static int strlen(string $str)

Details

at line 28
static public string expandPath(string $path)

Parses tildes and environment variables in paths.

Parameters

string $path

Return Value

string

at line 48
static public string getUserDirectory()

Return Value

string The formal user home as detected from environment parameters

Exceptions

RuntimeException If the user home could not reliably be determined

at line 70
static public bool isWindows()

Return Value

bool Whether the host machine is running a Windows OS

at line 79
static public int strlen(string $str)

Parameters

string $str

Return Value

int return a guaranteed binary length of the string, regardless of silly mbstring configs