The `unserialize()` function is used to deserialize objects or arrays that have been serialized using the `serialize()` function, and it returns the original object structure.
return value
Returns the converted value, which can be an integer, float, string, array, or object.
If the passed string cannot be deserialized, the function returns FALSE and generates an E_NOTICE.
<?php
$str = 'a:3:{i:0;s:6:"Google";i:1;s:6:"Runoob";i:2;s:8:"Facebook";}';
$unserialized_data = unserialize($str);
print_r($unserialized_data);
?>The output is:
Array
(
[0] => Google
[1] => Runoob
[2] => Facebook
)