|
serializeGenerates a storable representation of a value Description
string serialize
( mixed
$value
)Generates a storable representation of a value. This is useful for storing or passing PHP values around without losing their type and structure. To make the serialized string into a PHP value again, use unserialize. Parameters
Return Values
Returns a string containing a byte-stream representation of
Note that this is a binary string which may include null bytes, and needs to be stored and handled as such. For example, serialize output should generally be stored in a BLOB field in a database, rather than a CHAR or TEXT field. Examples
Example #1 serialize example
<?php Notes
Warning
When serialize serializes objects, the leading backslash is not included in the class name of namespaced classes for maximum compatibility. |