class FormatConverter (View source)

Format converter

Methods

static false|string
binaryToIp(mixed $buffer, bool $isBinary)

Transforms a binary to an IP

static string
ipToBinary(mixed $buffer)

Transforms an IP to a binary

static int|string
ipToLong(string $buffer)

Transforms an IP to a long

static string
longToIp(string $buffer)

Transforms a long to an IP

Details

static false|string binaryToIp(mixed $buffer, bool $isBinary)

Transforms a binary to an IP

Parameters

mixed $buffer

Data to transform

bool $isBinary

Return Value

false|string

static string ipToBinary(mixed $buffer)

Transforms an IP to a binary

Parameters

mixed $buffer

Data to transform

Return Value

string

static int|string ipToLong(string $buffer)

Transforms an IP to a long

Parameters

string $buffer

Data to transform

Return Value

int|string

static string longToIp(string $buffer)

Transforms a long to an IP

Parameters

string $buffer

Data to transform

Return Value

string