❮ PHP Variable Handling Reference
Convert serialized data back into actual data:
<?php
$data = serialize(array("Red", "Green", "Blue"));
echo $data . "<br>";
$test = unserialize($data);
var_dump($test);
?>
Try it Yourself »
The unserialize() function converts serialized data back into actual data.
unserialize(
string,
options);
Parameter | Description |
---|---|
string | Required. Specifies the serialized string |
options | Optional. Specifies options to be provided to the function, as an associative array. Can be either an array of class names which should be accepted, false to accept no classes, or true to accept all classes. True is default. |
Return Value: | The converted value. Can be a boolean, integer, float, string, array or object. FALSE, and an E_NOTICE on failure |
---|---|
Return Type: | Boolean, integer, float, string, array or object |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.0: Added the options parameter |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!