PHP function unserialize()

Availability in PHP 4.0, PHP 7.0

Creates a PHP value from a stored representation

Parameters

Parameter Data type Default value Note
$str string not Serialized string.
$options mixed null

Return values

mixed

Returns the converted value, which can be boolean, integer, float, string, array or object.

If the passed string is not unserializable, false is returned and E_NOTICE is issued.

Other resources

Official unserialize function documentation

Newsletter

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