unserialize

mixed unserialize(string serialized_value) 

Converts serialized data back into a typed PHP value.

Returns:

Value represented by the serialized string; FALSE if the given argument is not a serialized value

Description:

unserialize() converts a single string of serialized data back into the value that it represents. See the serialize() function for more information on how variables are serialized. If the serialized_value argument is not a string or is an invalid format for serialized data, the function returns FALSE.

Availability:

UNIX, Windows

Version:

3.0.5+, 4+

See also:

serialize() 

Example:

Basic use of unserialize()
 <pre> <?php // Serialize an array $serialized_data = serialize (array ('uno', 'dos', 'tres')); // Show what ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.