PHP serialize() Function
serialize() The function is used to serialize an object or array and return a string.
serialize() After serializing an object with the function, it can be easily passed to other places that need it, and its type and structure will not change.
If you want to turn the serialized string back into a PHP value, you can use unserialize().
PHP version requirement: PHP 4, PHP 5, PHP 7
Syntax
string serialize ( mixed $value )
Parameter Description:
- $value: the object or array to be serialized.
Return Value
Returns a string.
Example
Example
The output is:
a:3:{i:0;s:6:"Google";i:1;s:6:"Runoob";i:2;s:8:"Facebook";}
Available PHP Functions