PHP unserialize() Function
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:
- $str: the serialized string.
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
)
Available PHP Functions