class Platform (View source)

Platform helper for uniform platform-specific tests.

Methods

static string
expandPath(string $path)

Parses tildes and environment variables in paths.

static string
getUserDirectory()

No description

static bool
isWindows()

No description

static int
strlen(string $str)

No description

Details

static string expandPath(string $path)

Parses tildes and environment variables in paths.

Parameters

string $path

Return Value

string

static 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

static bool isWindows()

Return Value

bool Whether the host machine is running a Windows OS

static int strlen(string $str)

Parameters

string $str

Return Value

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