❮ PHP Variable Handling Reference
Convert a storable representation of a value:
<?php
$data = serialize(array("Red", "Green", "Blue"));
echo $data;
?>
Try it Yourself »
The serialize() function converts a storable representation of a value.
To serialize data means to convert a value to a sequence of bits, so that it can be stored in a file, a memory buffer, or transmitted across a network.
serialize(
value);
Parameter | Description |
---|---|
value | Required. Specifies the value to be serialized |
Return Value: | A string that contains a byte-stream representation of value. The string can be stored anywhere |
---|---|
Return Type: | String |
PHP Version: | 4.0+ |
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!