WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/maybe unserialize

Description

Unserialize value only if it was serialized.

Usage

<?php maybe_unserialize$original ?>

Parameters

$original
(string) (required) Maybe unserialized original, if is needed.
Default: None

Return Values

(mixed) 
Unserialized data can be any type.

Examples

Notes

  • Data might need to be serialized to allow it to be successfully stored and retrieved from a database in a form that PHP can understand.

Change Log

Since: 2.0.0

Source File

maybe_unserialize() is located in wp-includes/functions.php.

Related

See also index of Function Reference and index of Template Tags.