final class Cast

Converts variables in a similar way to implicit casting in PHP in strict types mode.

Methods

static bool
bool(mixed $value)

No description

static int
int(mixed $value)

No description

static float
float(mixed $value)

No description

static string
string(mixed $value)

No description

static bool|null
boolOrNull(mixed $value)

No description

static int|null
intOrNull(mixed $value)

No description

static float|null
floatOrNull(mixed $value)

No description

static string|null
stringOrNull(mixed $value)

No description

Details

at line 23
static bool bool(mixed $value)

No description

Parameters

mixed $value

Return Value

bool

at line 35
static int int(mixed $value)

No description

Parameters

mixed $value

Return Value

int

at line 51
static float float(mixed $value)

No description

Parameters

mixed $value

Return Value

float

at line 65
static string string(mixed $value)

No description

Parameters

mixed $value

Return Value

string

at line 77
static bool|null boolOrNull(mixed $value)

No description

Parameters

mixed $value

Return Value

bool|null

at line 83
static int|null intOrNull(mixed $value)

No description

Parameters

mixed $value

Return Value

int|null

at line 89
static float|null floatOrNull(mixed $value)

No description

Parameters

mixed $value

Return Value

float|null

at line 95
static string|null stringOrNull(mixed $value)

No description

Parameters

mixed $value

Return Value

string|null

Traits

Static class.