PHP function settype()

Availability in PHP 4.0

Set the type of a variable

Parameters

Parameter Data type Default value Note
$var mixed not The variable being converted.
$type string not Possible values of type are:

Return values

bool

Returns true on success, otherwise false on failure.

Other resources

Official documentation for the settype function

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.