maybe_unserialize()
最后更新于:2021-11-27 14:43:29
maybe_unserialize( string$data)Unserialize data only if it was serialized.
参数
- $data
-
(string) (Required) Data that might be unserialized.
响应
(mixed) Unserialized data can be any type.
源文件
文件: gc-includes/functions.php
function maybe_unserialize( $data ) {
if ( is_serialized( $data ) ) { // Don't attempt to unserialize data that wasn't serialized going in.
return @unserialize( trim( $data ) );
}
return $data;
}