Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

PHP unserialize() Function

PHP unserialize() Function

PHP Available FunctionsAvailable PHP Functions

unserialize() The function is used to serialize()deserialize an object or array serialized by the function, and return the original object structure.

PHP version requirement: PHP 4, PHP 5, PHP 7

Syntax



mixed unserialize ( string $str )

Parameter Description:

Return Value

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

If the passed string cannot be unserialized, returns FALSE and raises an E_NOTICE.

Example

Example

The output is:



Array

(

    [0] => Google

    [1] => Runoob

    [2] => Facebook

)

PHP Available FunctionsAvailable PHP Functions