is_serialized()检查值是否被序列化

目录

描述

译文

检查值是否被序列化。

如果$data不是字符串,返回的值将是错误的。序列化的数据都是字符串。

原文

Check value to find if it was serialized.

If $data is not a string, then returned value will always be false. Serialized data is always a string.

is_serialized() 描述

用法

<?php is_serialized$data ?>

is_serialized() 用法

参数

$data

(mixed) (必填) Value to check to see if was serialized.

默认值: None

is_serialized() 参数

返回值

(boolean) 

False if not serialized and true if it was.

is_serialized() 返回值

注意

  • 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.

is_serialized() 注意

历史

添加于 版本: 2.0.5

is_serialized() 历史

源文件

is_serialized() 函数的代码位于 wp-includes/functions.php.

is_serialized() 源文件